Skip to content

describeConfiguredModel

describeConfiguredModel(config): object

Defined in: packages/agent/src/modules/agUiCapabilities.ts:136

The provider and model serving this config, as GET /info reports them.

One derivation for both routes. /info and the capability declaration describing the model differently would be this node’s own failure mode reproduced one file away — and the two are read by the same client, for the same reason, often in the same session.

provider is the LangChain model’s _llmType() ("ollama", "anthropic", …) and model is the configured display name falling back to the chat model’s own field. Both are null rather than absent when nothing resolves, because /info has always answered that way and a caller distinguishing “no model configured” from “key missing from the response” is reading the wrong thing either way.

This function reports the REQUESTED name, so both callers guard it

Section titled “This function reports the REQUESTED name, so both callers guard it”

modelDisplayName and a raw spec’s own model are the name the user asked for, which is not evidence anything was built from it. Neither caller may publish that name unguarded, and neither does — but they guard it in different places and for different reasons, so do not “simplify” this by moving the test in here. Making this function readiness-aware would make it answer a question it is not asked, and would put the same branch in two callers that need different answers.

  • /info short-circuits before calling this, answering { status: 'error', provider: null, model: null } — a status endpoint, so it reports the state.
  • buildAgUiCapabilities calls this and then omits identity.metadata.model — a declaration, so an unknown model is undeclared rather than declared absent. The reasoning is recorded at that seam.

GthConfig

object

model: string | null

provider: string | null