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

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/c4e30593b16fa57ebe7230f2181b35149a3689c6)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: c4e30593b16fa57ebe7230f2181b35149a3689c6

Requested commit: c4e30593b16fa57ebe7230f2181b35149a3689c6

Commit: c4e30593b16fa57ebe7230f2181b35149a3689c6

Tree: 396e0c63a053c85a52bf448a5c704ac41f9ff9ca

Author: Anant Goel

Committer: GitHub

## Message

```
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
```

## Parents

- [39ea28735d1a3a4a7a171c62537d951ee82b7c39](https://git.cafe/gitcafe/zed/commit/39ea28735d1a3a4a7a171c62537d951ee82b7c39?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/c4e30593b16fa57ebe7230f2181b35149a3689c6?format=markdown)
