Commit 6a3eb78
authored
[aisdk] Set model config for CUA models (#576)
## Summary
CUA models require auto-truncation.
I also set `isReasoning` and `systemMessageMode` to match what Vercel's
AISDK sets for them, but honestly I'm not sure how those fields are
used... The inference calls worked just fine whether the roles were
"system" or "developer".
Also, it seems that CUA is indeed a "reasoning model", because we do get
reasoning output from it, even if it's not listed as a reasoning model
in OpenAI's docs. But, OpenAI's docs also say that reasoning models do
_not_ support temperature, but we do set temperature (after
loop-detection) and it does seem to work... so I'm a bit confused here.
I might have to change some of the AISDK code that currently enforces
that temperature is NOT set for reasoning models.
## How was it tested?
Ran `testpilot test` while pulling these local changes.
## Community Contribution License
All community contributions in this pull request are licensed to the
project maintainers under the terms of the [Apache 2
License](https://www.apache.org/licenses/LICENSE-2.0).
By creating this pull request I represent that I have the right to
license the contributions to the project maintainers under the Apache 2
License as stated in the [Community Contribution
License](https://github.com/jetify-com/opensource/blob/main/CONTRIBUTING.md#community-contribution-license).1 parent 98e6ea9 commit 6a3eb78
File tree
2 files changed
+13
-3
lines changed- aisdk/ai/provider/openai
- internal/codec
2 files changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | | - | |
10 | | - | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
73 | 77 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
| |||
0 commit comments