Skip to content

fix(tools): annotate tools with explicit Strict mode - #14

Merged
casparbreloh merged 1 commit into
mainfrom
fix/null-strict-in-tools
Apr 13, 2026
Merged

casparbreloh merged 1 commit into
mainfrom
fix/null-strict-in-tools

Conversation

@casparbreloh

Copy link
Copy Markdown
Owner
  • Fixes OpenRouter 400 errors on chat completions where strict was null instead of a boolean
  • @effect/ai-openrouter defaults strict to null when Tool.getStrictMode returns undefined, which OpenRouter rejects
  • Annotates all three tools with Tool.Strict, false to provide an explicit boolean, bypassing the library bug

- OpenRouterLanguageModel sets strict to null via ?? null when
  Tool.getStrictMode returns undefined
- OpenRouter rejects null, expecting a boolean
- Annotating with Tool.Strict false avoids the null path
@casparbreloh
casparbreloh merged commit 328569f into main Apr 13, 2026
1 check passed
@casparbreloh
casparbreloh deleted the fix/null-strict-in-tools branch April 13, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant