soma.cell

E0019: model_capability_missing

E0019 model_capability_missing — the configured model lacks a capability the agent needs.

A compile-time error of soma check, the checker of the Soma programming language (soma explain E0019).

The rule

think(prompt, map("requires", ["vision"], …)) declares capabilities the model must have, and soma check compares them with the model the agent resolves to: from soma.toml's [agent] section, or a [models.<name>] section the cell selects with cell agent Name [model: name]. Here the default model gemma3:12b does not advertise vision, so check fails instead of the call failing at run time. Point the agent at a model that has the capability (as here), or list the capability under that model's capabilities = [...] in soma.toml if you know it has it.

A program that triggers it

soma.toml

[agent]
provider = "ollama"
model = "gemma3:12b"

[models.sonnet]
provider = "anthropic"
model = "claude-sonnet-4-5"

wrong.cell

cell agent ReceiptReader {
    face {
        signal read_receipt(image_url: String) -> String
    }
    state job { initial: idle  idle -> done }
    on read_receipt(image_url: String) {
        let total = think("What is the total on the receipt at {image_url}?", map("requires", ["vision"], "max_tokens", 50))
        transition(image_url, "done")
        return total
    }
}

What soma check prints:

$ soma check wrong.cell
error: handler 'read_receipt' calls think() requiring ["vision"], but model 'gemma3:12b' does not advertise ["vision"]
  --> wrong.cell:6:5
  |
6 |     on read_receipt(image_url: String) {
  |     ^
  = code: E0019
✗ 1 error(s), 0 warning(s).

The fix field of soma check --json: handler 'read_receipt' calls think() requiring ["vision"], but model 'gemma3:12b' does not advertise ["vision"]

On line 1, cell agent ReceiptReader { becomes cell agent ReceiptReader [model: sonnet] {.

wrong.cell → right.cell

--- wrong.cell
+++ right.cell
@@ -1,3 +1,3 @@
-cell agent ReceiptReader {
+cell agent ReceiptReader [model: sonnet] {
     face {
         signal read_receipt(image_url: String) -> String

With the fix, soma check accepts the program:

$ soma check right.cell
✓ All checks passed.