Commit ae3e0f8
fix(playground-ui): remove default temperature and topP from studio agent settings (#12256)
## Summary
- Remove hardcoded `temperature: 0.5` and `topP: 1` defaults from
playground agent settings
- Let agent config and provider defaults handle these values instead
## Problem
Studio was applying its own defaults for temperature and topP, which
broke Claude Opus/Sonnet models that don't allow both to be specified
simultaneously. The previous fix attempted to detect Claude 4.5+ models
and reactively clear topP, but this was racy - the API request would
fire before the `useEffect` ran.
## Solution
The cleaner fix is to not set playground defaults at all. If neither the
agent nor the user explicitly sets temperature/topP, the playground just
doesn't send them, letting the provider use its own defaults.
## Test plan
- [x] Tested with `examples/agent-v6` using Claude Opus 4.5 - no longer
errors
- [x] Unit tests updated and passing
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Agent settings no longer include hardcoded temperature and topP
defaults; these now defer to agent configuration and provider defaults.
* **Tests**
* Unit tests updated to expect temperature and topP to be undefined by
default.
* **Chores**
* Changeset added documenting the behavioral change and patch release.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: CalebBarnes <CalebBarnes@users.noreply.github.com>
Co-authored-by: Marvin Frachet <marvin@mastra.ai>1 parent d904fa1 commit ae3e0f8
File tree
3 files changed
+13
-13
lines changed- .changeset
- packages/playground-ui/src/domains/agents/hooks
- __tests__
3 files changed
+13
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 7 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 27 | + | |
| 28 | + | |
32 | 29 | | |
33 | 30 | | |
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
37 | 34 | | |
38 | 35 | | |
39 | | - | |
| 36 | + | |
40 | 37 | | |
41 | 38 | | |
42 | 39 | | |
43 | 40 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
49 | 45 | | |
50 | 46 | | |
51 | 47 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
| |||
0 commit comments