Cross-repo root cause behind archie-core bead 7zu3. In ai-sdk (the pinned release archie-core consumes), provider/openai/chat_completions.go writes body[max_tokens] whenever the request sets a max-token bound, while reasoning-class models reject that parameter with HTTP 400 and require max_completion_tokens instead. The same module already resolves ModelInfo per model but the chat runtime discards its reasoning flag, so the provider has nothing to switch on. The Responses path in the same provider already renames the parameter, so the pattern exists; the chat-completions path needs the same class-aware choice. Durable fix: carry the reasoning flag into the provider request and select the parameter name from it, then release and bump archie-core's pin. Until then archie-core carries a mitigation (omit the bound for reasoning-class models).
Acceptance criteria
a reasoning-class model streams through the chat-completions path with a max-token bound honoured via max_completion_tokens, and a classic model still sends max_tokens; provider-level test covering both classes
Close reason
Moved to ai-sdk; tracked and fixed there.
Imported from beads archie-core-wivg · GitHub #1337 · type bug · priority P2 · created 2026-10-02 · closed 2026-10-05
Cross-repo root cause behind archie-core bead 7zu3. In ai-sdk (the pinned release archie-core consumes), provider/openai/chat_completions.go writes body[max_tokens] whenever the request sets a max-token bound, while reasoning-class models reject that parameter with HTTP 400 and require max_completion_tokens instead. The same module already resolves ModelInfo per model but the chat runtime discards its reasoning flag, so the provider has nothing to switch on. The Responses path in the same provider already renames the parameter, so the pattern exists; the chat-completions path needs the same class-aware choice. Durable fix: carry the reasoning flag into the provider request and select the parameter name from it, then release and bump archie-core's pin. Until then archie-core carries a mitigation (omit the bound for reasoning-class models).
### Acceptance criteria
a reasoning-class model streams through the chat-completions path with a max-token bound honoured via max_completion_tokens, and a classic model still sends max_tokens; provider-level test covering both classes
### Close reason
Moved to ai-sdk; tracked and fixed there.
---
_Imported from beads `archie-core-wivg` · GitHub #1337 · type bug · priority P2 · created 2026-10-02 · closed 2026-10-05_
sam
added the bugmedium labels 2026-10-27 13:41:13 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Cross-repo root cause behind archie-core bead 7zu3. In ai-sdk (the pinned release archie-core consumes), provider/openai/chat_completions.go writes body[max_tokens] whenever the request sets a max-token bound, while reasoning-class models reject that parameter with HTTP 400 and require max_completion_tokens instead. The same module already resolves ModelInfo per model but the chat runtime discards its reasoning flag, so the provider has nothing to switch on. The Responses path in the same provider already renames the parameter, so the pattern exists; the chat-completions path needs the same class-aware choice. Durable fix: carry the reasoning flag into the provider request and select the parameter name from it, then release and bump archie-core's pin. Until then archie-core carries a mitigation (omit the bound for reasoning-class models).
Acceptance criteria
a reasoning-class model streams through the chat-completions path with a max-token bound honoured via max_completion_tokens, and a classic model still sends max_tokens; provider-level test covering both classes
Close reason
Moved to ai-sdk; tracked and fixed there.
Imported from beads
archie-core-wivg· GitHub #1337 · type bug · priority P2 · created 2026-10-02 · closed 2026-10-05