Commit 99ba260
Correct error message for invalid output types with strict JSON schema (#1101)
### Problem
1. **Incorrect parameter reference**: Suggests passing
`output_schema_strict=False` to `Agent()`, but this parameter doesn't
exist
2. **Vague guidance**: The phrase "make the output type strict" doesn't
explain HOW to make types strict
### Solution
Updated the error message to provide accurate, actionable guidance:
**Before:**
```
"Either make the output type strict, or pass output_schema_strict=False to your Agent()"
```
**After:**
```
"Either use a dataclass, Pydantic model, or TypedDict, or wrap your type with AgentOutputSchema(your_type, strict_json_schema=False)"
```
---------
Co-authored-by: Kazuhiro Sera <[email protected]>1 parent 66e5be3 commit 99ba260
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
| 118 | + | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
0 commit comments