Commit c5c8a68
committed
Fix Pydantic field alias consistency in structured output
Resolve inconsistency between schema and actual output when using Pydantic models with field aliases as tool return types:
- Add by_alias=True parameter to model_dump() call in func_metadata.py
- Add comprehensive test case to verify alias consistency
- Ensure schema generation and structured output use same aliased field names
Before: Schema shows "first", "second" but output uses "field_first", "field_second"
After: Both schema and output consistently use aliased field names1 parent 906ceea commit c5c8a68
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
0 commit comments