diff options
| author | sigoden <sigoden@gmail.com> | 2025-02-04 10:38:07 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-04 10:38:07 +0800 |
| commit | 470eeb2efc8b5c9f20ec275d3b2ced1d92e1642d (patch) | |
| tree | 5bc5ad79a6f668c2a32e39b48643b17fb4763d20 /src/client/openai.rs | |
| parent | 09c5a03c0e6728a407660215c4dc63491a3c024c (diff) | |
| download | aichat-470eeb2efc8b5c9f20ec275d3b2ced1d92e1642d.tar.gz | |
feat: add model field `supports_reasoning` (#1145)
Diffstat (limited to 'src/client/openai.rs')
| -rw-r--r-- | src/client/openai.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/openai.rs b/src/client/openai.rs index 928a600..7989c34 100644 --- a/src/client/openai.rs +++ b/src/client/openai.rs @@ -301,6 +301,9 @@ pub fn openai_build_chat_completions_body(data: ChatCompletionsData, model: &Mod if let Some(v) = model.max_tokens_param() { body["max_tokens"] = v.into(); } + if model.client_name().starts_with("openrouter") && model.supports_reasoning() { + body["include_reasoning"] = true.into(); + } if let Some(v) = temperature { body["temperature"] = v.into(); } |
