Repository navigation
Commit 5a1a604
committed
fix(agentstudio): let copy_with retune a forward-compat field
copy_with validated its keywords against _fields only, so a key the server
adds and this SDK does not know yet could ride along a copy but could not be
changed: ModelConfig(id="x", vendor="qwen").copy_with(vendor="other") raised
"unknown model config field", even though vendor was in the payload.
Validate against _fields plus what the config actually carries. The guard
keeps its teeth where it matters: a typo (temp=0.5) and inventing a wire field
out of thin air (ModelConfig(id="x").copy_with(vendor="y")) still raise.1 parent b6798e7 commit 5a1a604
2 files changed
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
471 | | - | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
472 | 474 | | |
473 | | - | |
| 475 | + | |
474 | 476 | | |
475 | 477 | | |
476 | 478 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
278 | 285 | | |
279 | 286 | | |
280 | 287 | | |
| |||
0 commit comments