The agent declares a per-model context window at register and heartbeat. That number is shown to users and decides which requests are routed to a node, so a wrong declaration costs the operator real traffic.
The question this issue opened with was whether 32768 is a detected value or a fallback the agent emits when detection fails. Several nodes declare it on models whose published window is larger, which is what raised the question.
Resolved for the one node that could be inspected directly. On Nova Provider, 32,768 is a correct measurement of a backend genuinely configured at 32,768, and the agent has no fallback constant. Evidence in the comments below, including the memory arithmetic that explains why it is 32,768 on that hardware.
What was checked on the agent
- backend is vLLM, launched
--served-model-name TheDrummer/Cydonia-24B-v4.3 --max-model-len 32768
/v1/models returns max_model_len: 32768
- the agent declares
32768 (detected) — a measurement, not a constant
- a long prompt sent to that backend returns HTTP 400, "maximum context length is 32768 tokens"
There is also no fallback constant in the agent and never has been: git log -S'32768' -- '*.go' returns three commits and every occurrence is a test fixture; no DefaultContextLength exists in the history. resolveModelContexts already omits any model whose window it cannot determine, which is the behaviour asked for below — 7 of this node's 8 models are absent from the declaration rather than guessed at.
32,768 is a very common --max-model-len for 24B-class models on constrained VRAM, so more than one operator landing on it is what a popular default looks like.
Still open: the same check on other nodes
Per node, this settles it:
docker inspect <container> --format '{{join .Config.Cmd " "}}' | grep -A1 max-model-len
curl -s localhost:<port>/v1/models # compare max_model_len
computing-provider inference status # compare what the agent declares
If the command line, /v1/models, and inference status all agree, the declaration is accurate and there is nothing to fix. A case where the declared value and the backend's own max_model_len disagree would be a real bug and worth reporting here.
Preferred agent behaviour (unchanged, and already implemented)
If the real window cannot be determined, send nothing rather than a guess. An absent declaration is treated as "unknown" and falls back to the model's published window; a present one is treated as a claim and routed on. Guessing low silently costs the operator every long-context request.
For vLLM and SGLang the value comes from max_model_len in /v1/models. For backends that expose nothing (Ollama, llama.cpp, OpenAI-compatible proxies), models.json supports a manual context_length override, and it wins over detection.
Follow-up: declaration provenance
The agent already distinguishes detected / override / unknown internally, and the two paths differ in how much they can be trusted:
- detected (
max_model_len from vLLM/SGLang) is self-verifying — vLLM refuses to start when --max-model-len exceeds what the KV cache can hold.
- override (
context_length in models.json) is forwarded as written, because the agent has no way to confirm it.
Sending that provenance alongside the value would let the receiving side tell a self-verifying declaration from an unverifiable one. Tracked separately; no agent change is required for it to be adopted, since an absent field means unknown and every agent in the field keeps working unchanged.
The agent declares a per-model context window at register and heartbeat. That number is shown to users and decides which requests are routed to a node, so a wrong declaration costs the operator real traffic.
The question this issue opened with was whether
32768is a detected value or a fallback the agent emits when detection fails. Several nodes declare it on models whose published window is larger, which is what raised the question.What was checked on the agent
--served-model-name TheDrummer/Cydonia-24B-v4.3 --max-model-len 32768/v1/modelsreturnsmax_model_len: 3276832768 (detected)— a measurement, not a constantThere is also no fallback constant in the agent and never has been:
git log -S'32768' -- '*.go'returns three commits and every occurrence is a test fixture; noDefaultContextLengthexists in the history.resolveModelContextsalready omits any model whose window it cannot determine, which is the behaviour asked for below — 7 of this node's 8 models are absent from the declaration rather than guessed at.32,768 is a very common
--max-model-lenfor 24B-class models on constrained VRAM, so more than one operator landing on it is what a popular default looks like.Still open: the same check on other nodes
Per node, this settles it:
If the command line,
/v1/models, andinference statusall agree, the declaration is accurate and there is nothing to fix. A case where the declared value and the backend's ownmax_model_lendisagree would be a real bug and worth reporting here.Preferred agent behaviour (unchanged, and already implemented)
If the real window cannot be determined, send nothing rather than a guess. An absent declaration is treated as "unknown" and falls back to the model's published window; a present one is treated as a claim and routed on. Guessing low silently costs the operator every long-context request.
For vLLM and SGLang the value comes from
max_model_lenin/v1/models. For backends that expose nothing (Ollama, llama.cpp, OpenAI-compatible proxies),models.jsonsupports a manualcontext_lengthoverride, and it wins over detection.Follow-up: declaration provenance
The agent already distinguishes
detected/override/unknowninternally, and the two paths differ in how much they can be trusted:max_model_lenfrom vLLM/SGLang) is self-verifying — vLLM refuses to start when--max-model-lenexceeds what the KV cache can hold.context_lengthinmodels.json) is forwarded as written, because the agent has no way to confirm it.Sending that provenance alongside the value would let the receiving side tell a self-verifying declaration from an unverifiable one. Tracked separately; no agent change is required for it to be adopted, since an absent field means
unknownand every agent in the field keeps working unchanged.