Skip to content

Commit 0238570

Browse files
KastanDaydanlapid
authored andcommitted
fix(types): make Workers AI reasoning types suggestions instead of restrictions
Regenerated from the SDK generator (cloudflare/ai/sdk!1778) against production model metadata. No code that type-checked before is rejected: - `AiReasoningEffortHint<Suggested>` suggests a model's supported efforts in editors but accepts any string. Shared Chat Completions `reasoning_effort` and Responses request `reasoning.effort` use it too. - Response types (`Reasoning`, `ReasoningEffort`, outputs) are unchanged. - Models with reasoning metadata get `<Model>_ChatInput` / `_ChatTemplateKwargs` (and `_ResponsesInput` / `_Reasoning` for gpt-oss) interfaces extending the shared types with per-model docs: supported levels, aliases, defaults, and whether reasoning can be disabled. - `enable_thinking` stays `boolean` for every model. - Adds the public `@cf/zai-org/glm-5.3` model. - Keeps `Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT` as a deprecated alias of the generated `..._It` class.
1 parent 856051d commit 0238570

6 files changed

Lines changed: 1447 additions & 318 deletions

File tree

0 commit comments

Comments
 (0)