Skip to content

A task cannot be sent to a custom provider's model: the task catalog never lists it #1414

Description

@santoshkumarradha

What happened

A conversation running on a custom OpenAI-compatible connection (model_sources, written: local, address http://127.0.0.1:8317/v1) talks to its local model with no trouble, and the runner is up and lists that model. Asking for a task on the same model is refused: "no model here is called <local model> — did you mean <three cloud model ids>? Name one of those, or leave model out to run on <another cloud model>."

Every suggestion and the fallback are cloud models. There is no spelling of the local model the door will accept, so a task from a locally-backed conversation always runs on a billed cloud model or not at all.

Where

propose_task's model is resolved by resolveTaskModel against Config.TaskModels (internal/session/taskmodel.go). That list is built by v3TaskModels in cmd/codeaf/chatv3.go, which takes tui3.ChatModels(v3Models(models)) — the chat catalog. The custom source's models are not in it, even though the conversation's own model comes from that source.

The refusal is taskModelUnknown: zero candidates against a non-empty list. When the list is warming and returns nil, the same code takes the named model as written and lets the provider answer for it, so the failure only appears once the catalog has loaded.

Not specific to one branch

v3TaskModels is byte-identical on origin/main and origin/santos/dev2 (git diff shows nothing in it), and the running binary that reproduced it (codeaf 80bdef3, built 2026-09-23 13:47) is an ancestor of santos/dev2. Whatever fixes it belongs on the line that lands, not on a side branch.

Acceptance

  • A task proposal naming a model the custom connection serves resolves to that model and runs on it, the way the conversation already does.
  • A model the connection does not serve is still refused, with the connection's own models among the suggestions rather than only the cloud catalog.
  • A conversation on a cloud model is unchanged: naming an unknown id is still refused, and an empty model still falls back as it does today.

Reproduced 2026-09-23 on darwin/arm64 against the local runner at 127.0.0.1:8317, which was listing the conversation's model at the time.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:sessionThe engine — turns, tasks, the toolbelt, checkpointsbugSomething the code does that it should notsev:seriousWrong or missing behaviour a person meets in ordinary use

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions