Patch Changes
-
#10076
217d2edThanks @hntrl! - fix(google): accept both uppercase and lowercase reasoning effort/thinking level valuesPreviously, passing uppercase values like
reasoningEffort: "HIGH"or"MEDIUM"would silently
fail to configure thinking, becauseconvertReasoningEffortToReasoningTokensonly matched lowercase
strings. This caused thethinkingConfigto be omitted entirely from the API request.- Normalize effort input to lowercase in
convertReasoningEffortToReasoningTokens - Extend
Gemini.ThinkingLeveltype to include lowercase variants for better DX - Add
LowercaseLiteralutility type to derive lowercase members from the auto-generated API types
- Normalize effort input to lowercase in
-
#10081
5a6f26bThanks @hntrl! - feat(core): add namespace-based symbol branding for error class hierarchiesIntroduces
createNamespaceutility for hierarchical symbol-based branding of class hierarchies.
All LangChain error classes now use this pattern, replacing hand-rolled duck-typeisInstancechecks
with reliable cross-realmSymbol.for-based identity.- New
LangChainErrorbase class that all LangChain errors extend - New
createNamespace/NamespaceAPI in@langchain/core/utils/namespace - Refactored
ModelAbortError,ContextOverflowErrorto use namespace branding - Added
ContextOverflowError.fromError()static factory method - Deprecated
addLangChainErrorFieldsin favor ofLangChainErrorsubclasses - Migrated Google provider errors (
GoogleError,ConfigurationError, etc.) to namespace branding - Updated Anthropic and OpenAI providers to use
ContextOverflowError.fromError()
- New
-
#10078
7be50a7Thanks @christian-bromann! - chore(*): update model profiles