Commit 96c7502
feat: add reasoning parameter to
* fix: add reasoning parameter to ChatAzureOpenAI for reasoning model detection
Azure OpenAI uses custom deployment IDs instead of model names, so the
existing `is_reasoning_model()` check (which looks for "o" or "gpt-5"
prefixes) doesn't work. This adds a `reasoning` parameter to
`ChatAzureOpenAI()` that users can set to enable reasoning features for
their o-series deployments.
Changes:
- Add `_is_reasoning_model` attribute to `OpenAIProvider`
- Use `self._is_reasoning_model` instead of `is_reasoning_model(self.model)`
in `_chat_perform_args()` to determine whether to include reasoning content
- Add `reasoning` parameter to `ChatAzureOpenAI()` matching `ChatOpenAI()`
- Fix type annotations to use `ResponsesSubmitInputArgs` and `Response`
(since Azure uses the responses API, not completions)
Fixes #242
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: also detect reasoning models by deployment_id pattern
When deployment_id matches known reasoning model patterns (o*, gpt-5*),
automatically enable reasoning features. This maintains backward
compatibility with existing tests while still allowing explicit
override via the reasoning parameter for custom deployment names.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Include encrypted content if reasoning is specified
This way, for Azure, an empty dictionary will lead to encrypted content being included
* Update changelog
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>ChatAzureOpenAI() (#260)1 parent 83333c2 commit 96c7502
File tree
3 files changed
+26
-4
lines changed- chatlas
3 files changed
+26
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
| 282 | + | |
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
15 | 23 | | |
16 | 24 | | |
17 | 25 | | |
| |||
21 | 29 | | |
22 | 30 | | |
23 | 31 | | |
| 32 | + | |
24 | 33 | | |
25 | 34 | | |
26 | 35 | | |
27 | 36 | | |
28 | | - | |
| 37 | + | |
29 | 38 | | |
30 | 39 | | |
31 | 40 | | |
| |||
65 | 74 | | |
66 | 75 | | |
67 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
68 | 82 | | |
69 | 83 | | |
70 | 84 | | |
| |||
81 | 95 | | |
82 | 96 | | |
83 | 97 | | |
84 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
85 | 105 | | |
86 | 106 | | |
87 | 107 | | |
| |||
0 commit comments