@prestyj/ai 4.5.0 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -40,7 +40,7 @@ Tool parameters are Zod schemas. Converted to JSON Schema at the provider bounda
40
40
 
41
41
  | Provider | Models | Notes |
42
42
  |---|---|---|
43
- | `anthropic` | Claude Opus 4.8, Sonnet 4.6, Haiku 4.5 | Extended thinking, prompt caching, server-side compaction |
43
+ | `anthropic` | Claude Fable 5, Opus 4.8, Sonnet 4.6, Haiku 4.5 | Extended thinking, prompt caching, server-side compaction |
44
44
  | `openai` | GPT-4.1, o3, o4-mini | Supports OAuth (codex endpoint) and API keys |
45
45
  | `glm` | GLM-5.1, GLM-4.7 | Z.AI platform, OpenAI-compatible |
46
46
  | `moonshot` | Kimi K2.6 | Moonshot platform, OpenAI-compatible |
package/dist/index.cjs CHANGED
@@ -737,12 +737,12 @@ function toAnthropicToolChoice(choice) {
737
737
  return { type: "tool", name: choice.name };
738
738
  }
739
739
  function isAdaptiveThinkingModel(model) {
740
- return /opus-4[-.]8|opus-4[-.]7|opus-4[-.]6|sonnet-4[-.]6/.test(model);
740
+ return /fable-5|opus-4[-.]8|opus-4[-.]7|opus-4[-.]6|sonnet-4[-.]6/.test(model);
741
741
  }
742
742
  function toAnthropicThinking(level, maxTokens, model) {
743
743
  if (isAdaptiveThinkingModel(model)) {
744
744
  let effort = level;
745
- if (effort === "xhigh" && !/opus-4-8|opus-4-7/.test(model)) {
745
+ if (effort === "xhigh" && !/opus-4-8|opus-4-7|fable-5/.test(model)) {
746
746
  effort = "high";
747
747
  }
748
748
  return {