language_models: Clear speed for OpenAI-compatible providers that don't support fast mode (#59496)

`OpenAiCompatibleLanguageModel::stream_completion` (used for custom
OpenAI-compatible providers) forwarded `request.speed` straight into
`into_open_ai`/`into_open_ai_response`, which translate `Speed::Fast`
into OpenAI's `service_tier` field. Custom OpenAI-compatible endpoints
don't recognize that field and reject the request.

`speed` can end up set even for a provider that doesn't support fast
mode: `Thread::inherit_parent_settings` copies `speed` from a parent
thread to a subagent without checking whether the subagent's model
supports it.

Every other provider sharing this conversion code already guards against
this (`open_ai.rs`, `anthropic.rs`, `anthropic_compatible.rs`,
`language_models_cloud.rs`). This adds the same guard for
`OpenAiCompatibleLanguageModel`.

Release Notes:

- Fixed requests to OpenAI-compatible providers (e.g. Baseten) sometimes
including an unsupported `service_tier` parameter
c4e30593b1Anant Goel committed on 6/17/2026, 5:35:47 PM· committed by GitHubparent39ea287
1 file changedLine totals unavailable