Agent worker runtime has no model catalog, so reasoning models there still get max_tokens #1237

Closed
opened 2026-10-27 13:39:34 +00:00 by sam · 0 comments
Owner

The gateway now loads the cached models.dev snapshot into its ai-sdk runtime, but archie-agent calls modelloop.NewRuntime with no catalog path, so ModelInfo.Reasoning is false for task agent stages and MCP sampling. Done when a reasoning model run inside the agent container is sent max_completion_tokens.

Close reason

Already fixed: ForTask carries catalog ModelLimits (incl. Reasoning) for every aliased model (b74f2a01); archie-agent builds its runtime from req.Cfg.ModelLimits, so reasoning models there get max_completion_tokens. Stages reach models only through aliases.


Imported from beads archie-core-b8fx · GitHub #1506 · type bug · priority P2 · created 2026-10-05 · closed 2026-10-24

The gateway now loads the cached models.dev snapshot into its ai-sdk runtime, but archie-agent calls modelloop.NewRuntime with no catalog path, so ModelInfo.Reasoning is false for task agent stages and MCP sampling. Done when a reasoning model run inside the agent container is sent max_completion_tokens. ### Close reason Already fixed: ForTask carries catalog ModelLimits (incl. Reasoning) for every aliased model (b74f2a01); archie-agent builds its runtime from req.Cfg.ModelLimits, so reasoning models there get max_completion_tokens. Stages reach models only through aliases. --- _Imported from beads `archie-core-b8fx` · GitHub #1506 · type bug · priority P2 · created 2026-10-05 · closed 2026-10-24_
sam added the mediumbug labels 2026-10-27 13:39:34 +00:00
sam self-assigned this 2026-10-27 13:39:34 +00:00
sam closed this issue 2026-10-27 13:39:34 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1237