You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is fine if using the official models. However, with the 3rd-party providers, such as openrouter, this function prevents users to use models with reasoning support.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
@langchain/openai decides which model supports reasoning by using this function currently:
langchainjs/libs/langchain-openai/src/chat_models.ts
Lines 124 to 129 in 9eb78b7
This is fine if using the official models. However, with the 3rd-party providers, such as openrouter, this function prevents users to use models with reasoning support.
This is an example:
This works fine only except the reasoning because the model name
openai/gpt-5
could never pass the check function.I suggest to support passing a custom check function or regex pattern to determine which is a reasoning model. Is this a valid point?
Beta Was this translation helpful? Give feedback.
All reactions