-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(langchain/createAgent): improve structured output handling #9033
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
libs/langchain/src/agents/middlewareAgent/tests/reactAgent.int.test.ts
Outdated
Show resolved
Hide resolved
const CHAT_MODELS_THAT_SUPPORT_JSON_SCHEMA_OUTPUT = ["ChatOpenAI", "ChatXAI"]; | ||
const MODEL_NAMES_THAT_SUPPORT_JSON_SCHEMA_OUTPUT = [ | ||
"grok", | ||
"gpt-5", | ||
"gpt-4.1", | ||
"gpt-4o", | ||
"gpt-oss", | ||
"o3-pro", | ||
"o3-mini", | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming this list is incomplete? Post V1 I'd love if we did some exploration on how to make this native to the provider packages (maintaining this list separately/ any kind of "model capability matrix" feels like asking for trouble)
(no fix needed here, just a comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯 Let's create a post v1 list
….test.ts Co-authored-by: Hunter Lovell <[email protected]>
7d3e517
to
730b618
Compare
This patch updates the structured output behavior for
createAgent
:modifyModelRequest
hook of the middleware