genaicode 2.7.0 → 3.0.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/CHANGELOG.md +0 -23
- package/README.md +0 -4
- package/dist/providers/anthropic-converter.d.ts +0 -17
- package/dist/providers/anthropic-converter.js +12 -84
- package/dist/providers/anthropic-converter.js.map +1 -1
- package/dist/providers.d.ts +2 -2
- package/dist/providers.js +1 -1
- package/dist/providers.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,28 +1,5 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 2.7.0 — 2026-09-29
|
|
4
|
-
|
|
5
|
-
### Added
|
|
6
|
-
|
|
7
|
-
- The Anthropic provider maps `thinking.level` to `output_config.effort` (`minimal` and
|
|
8
|
-
`low` → `low`, `medium`, `high`) with adaptive thinking on models that have it (Opus and
|
|
9
|
-
Sonnet 4.6 and later, Fable, Mythos). Before, `level` was ignored on Anthropic.
|
|
10
|
-
- `anthropicModelTraits(model)` reports what a Claude model ID accepts (adaptive thinking,
|
|
11
|
-
budgets, temperature, forced tool choice, how thinking turns off). It reads Bedrock
|
|
12
|
-
(`anthropic.`) and Vertex (`@date`) IDs too.
|
|
13
|
-
|
|
14
|
-
### Fixed
|
|
15
|
-
|
|
16
|
-
- Claude Sonnet 5.5, Opus 5.5 and Fable 5.1 no longer 400 on requests genaicode builds:
|
|
17
|
-
- `thinking: false` sends `between_tools` on Sonnet 5.5, and on Opus 5.5 / Fable / Mythos
|
|
18
|
-
(where thinking cannot be turned off) leaves `thinking` out and sets effort `low`.
|
|
19
|
-
- A forced `toolChoice` (`'required'` or `{ name }`) becomes `auto` plus a system-prompt
|
|
20
|
-
line asking for the call. These models reject `any` / `tool`; check that a call was made.
|
|
21
|
-
- `thinking.budgetTokens` becomes adaptive thinking on models that removed budgets (Opus
|
|
22
|
-
4.7+, Sonnet 5+, Fable, Mythos) instead of a 400.
|
|
23
|
-
- `temperature` is left out on models that reject it (Opus 4.7+, Sonnet 5+, Fable, Mythos),
|
|
24
|
-
as for `gpt-6-luna`.
|
|
25
|
-
|
|
26
3
|
## 2.6.0 — 2026-09-28
|
|
27
4
|
|
|
28
5
|
### Added
|
package/README.md
CHANGED
|
@@ -254,10 +254,6 @@ const verdict = await ai(promptText)
|
|
|
254
254
|
because Gemini 3 rejects `thinkingBudget: 0`. JSON `responseFormat` without an
|
|
255
255
|
explicit `thinking` setting or provider `generationConfig.thinkingConfig` default also
|
|
256
256
|
defaults Google thinking to `MINIMAL` (or `LOW` on Gemini 3.7 / Pro).
|
|
257
|
-
On Anthropic, `level` becomes `output_config.effort` with adaptive thinking (Opus and
|
|
258
|
-
Sonnet 4.6+), and `false` uses whatever the model accepts: `disabled`, `between_tools`
|
|
259
|
-
(Sonnet 5.5), or effort `low` where thinking is always on (Opus 5.5, Fable). Budgets
|
|
260
|
-
become adaptive thinking on models that removed them.
|
|
261
257
|
|
|
262
258
|
Providers map what they support and ignore the rest. `ProviderCapabilities.jsonResponse`
|
|
263
259
|
and `ProviderCapabilities.thinking` advertise support. Vendor-specific escapes such as
|
|
@@ -8,22 +8,5 @@ export interface AnthropicRequestDefaults {
|
|
|
8
8
|
maxOutputTokens?: number;
|
|
9
9
|
thinking?: Anthropic.ThinkingConfigParam;
|
|
10
10
|
}
|
|
11
|
-
/** What a Claude model accepts, where it differs across generations. */
|
|
12
|
-
export interface AnthropicModelTraits {
|
|
13
|
-
/** Adaptive thinking and `output_config.effort` are available. */
|
|
14
|
-
adaptiveThinking: boolean;
|
|
15
|
-
/** `thinking: { type: 'enabled', budget_tokens }` returns a 400. */
|
|
16
|
-
rejectsBudgetTokens: boolean;
|
|
17
|
-
/** A non-default `temperature` returns a 400. */
|
|
18
|
-
rejectsTemperature: boolean;
|
|
19
|
-
/** Forced `tool_choice` (`any` / `tool`) returns a 400. */
|
|
20
|
-
rejectsForcedToolChoice: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* How the model turns thinking off: `disabled`, `between_tools` (its lowest
|
|
23
|
-
* setting), or `none` when thinking is always on and only effort lowers it.
|
|
24
|
-
*/
|
|
25
|
-
thinkingOff: 'disabled' | 'between_tools' | 'none';
|
|
26
|
-
}
|
|
27
|
-
export declare function anthropicModelTraits(model: string): AnthropicModelTraits;
|
|
28
11
|
export declare function toAnthropicRequest(request: GenerationRequest, defaults: AnthropicRequestDefaults): Anthropic.MessageCreateParamsNonStreaming;
|
|
29
12
|
export declare function fromAnthropicMessage(message: Anthropic.Message): GenerationResult;
|
|
@@ -58,82 +58,19 @@ export function toAnthropicToolChoice(choice) {
|
|
|
58
58
|
return { type: 'any' };
|
|
59
59
|
return { type: 'tool', name: choice.name };
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
adaptiveThinking: false,
|
|
63
|
-
rejectsBudgetTokens: false,
|
|
64
|
-
rejectsTemperature: false,
|
|
65
|
-
rejectsForcedToolChoice: false,
|
|
66
|
-
thinkingOff: 'disabled',
|
|
67
|
-
};
|
|
68
|
-
// Matches `claude-sonnet-5-5`, `anthropic.claude-opus-4-7`, `claude-opus-4-5@20251101`,
|
|
69
|
-
// `claude-sonnet-4-20250514`; a date is never read as a minor version.
|
|
70
|
-
const CLAUDE_MODEL = /claude-(opus|sonnet|haiku|fable|mythos)-(\d{1,2})(?:-(\d{1,2}))?(?!\d)/;
|
|
71
|
-
export function anthropicModelTraits(model) {
|
|
72
|
-
const match = CLAUDE_MODEL.exec(model.toLowerCase());
|
|
73
|
-
if (!match)
|
|
74
|
-
return LEGACY_TRAITS;
|
|
75
|
-
const family = match[1];
|
|
76
|
-
const version = Number(match[2]) + Number(match[3] ?? 0) / 10;
|
|
77
|
-
const at = (min) => version >= min;
|
|
78
|
-
if (family === 'fable' || family === 'mythos') {
|
|
79
|
-
return {
|
|
80
|
-
adaptiveThinking: true,
|
|
81
|
-
rejectsBudgetTokens: true,
|
|
82
|
-
rejectsTemperature: true,
|
|
83
|
-
rejectsForcedToolChoice: at(5.1),
|
|
84
|
-
thinkingOff: 'none',
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
if (family === 'opus' || family === 'sonnet') {
|
|
88
|
-
const since = family === 'opus' ? 4.7 : 5;
|
|
89
|
-
return {
|
|
90
|
-
adaptiveThinking: at(4.6),
|
|
91
|
-
rejectsBudgetTokens: at(since),
|
|
92
|
-
rejectsTemperature: at(since),
|
|
93
|
-
rejectsForcedToolChoice: at(5.5),
|
|
94
|
-
thinkingOff: !at(5.5) ? 'disabled' : family === 'sonnet' ? 'between_tools' : 'none',
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
return LEGACY_TRAITS;
|
|
98
|
-
}
|
|
99
|
-
const EFFORT_BY_LEVEL = {
|
|
100
|
-
minimal: 'low',
|
|
101
|
-
low: 'low',
|
|
102
|
-
medium: 'medium',
|
|
103
|
-
high: 'high',
|
|
104
|
-
};
|
|
105
|
-
function toAnthropicThinking(thinking, fallback, traits) {
|
|
61
|
+
function toAnthropicThinking(thinking, fallback) {
|
|
106
62
|
if (thinking === undefined)
|
|
107
|
-
return
|
|
108
|
-
const effort = thinking && thinking.level && traits.adaptiveThinking ? EFFORT_BY_LEVEL[thinking.level] : undefined;
|
|
63
|
+
return fallback;
|
|
109
64
|
if (thinking === false || thinking.budgetTokens === 0) {
|
|
110
|
-
|
|
111
|
-
return { effort: effort ?? 'low' };
|
|
112
|
-
if (traits.thinkingOff === 'between_tools') {
|
|
113
|
-
// Not in the SDK's types yet; the API takes it as-is.
|
|
114
|
-
return { thinking: { type: 'between_tools' }, effort };
|
|
115
|
-
}
|
|
116
|
-
return { thinking: { type: 'disabled' }, effort };
|
|
65
|
+
return { type: 'disabled' };
|
|
117
66
|
}
|
|
118
|
-
if (thinking.budgetTokens !== undefined
|
|
119
|
-
return {
|
|
67
|
+
if (thinking.budgetTokens !== undefined) {
|
|
68
|
+
return { type: 'enabled', budget_tokens: thinking.budgetTokens };
|
|
120
69
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
// Older models have no qualitative level; keep the provider default.
|
|
124
|
-
return { thinking: fallback };
|
|
125
|
-
}
|
|
126
|
-
// Newer models 400 on forced tool use, so ask for the call in the system prompt instead.
|
|
127
|
-
function forcedToolInstruction(choice) {
|
|
128
|
-
if (!choice || choice === 'auto' || choice === 'none')
|
|
129
|
-
return undefined;
|
|
130
|
-
if (choice === 'required')
|
|
131
|
-
return 'Respond by calling one of the provided tools.';
|
|
132
|
-
return `Respond by calling the \`${choice.name}\` tool.`;
|
|
70
|
+
// Anthropic has no qualitative level; ignore `level` and keep the provider default.
|
|
71
|
+
return fallback;
|
|
133
72
|
}
|
|
134
73
|
export function toAnthropicRequest(request, defaults) {
|
|
135
|
-
const model = request.model ?? defaults.model;
|
|
136
|
-
const traits = anthropicModelTraits(model);
|
|
137
74
|
// Unlike Google, Anthropic allows the web_search server tool alongside function tools.
|
|
138
75
|
const tools = (request.tools ?? []).map((tool) => ({
|
|
139
76
|
name: tool.name,
|
|
@@ -142,24 +79,15 @@ export function toAnthropicRequest(request, defaults) {
|
|
|
142
79
|
}));
|
|
143
80
|
if (request.search)
|
|
144
81
|
tools.push(WEB_SEARCH_TOOL);
|
|
145
|
-
const system = toAnthropicSystem(request.prompt);
|
|
146
|
-
let toolChoice = request.tools?.length ? toAnthropicToolChoice(request.toolChoice) : undefined;
|
|
147
|
-
const instruction = request.tools?.length ? forcedToolInstruction(request.toolChoice) : undefined;
|
|
148
|
-
if (instruction && traits.rejectsForcedToolChoice) {
|
|
149
|
-
toolChoice = { type: 'auto' };
|
|
150
|
-
system.push({ type: 'text', text: instruction });
|
|
151
|
-
}
|
|
152
|
-
const { thinking, effort } = toAnthropicThinking(request.thinking, defaults.thinking, traits);
|
|
153
82
|
return {
|
|
154
|
-
model,
|
|
83
|
+
model: request.model ?? defaults.model,
|
|
155
84
|
max_tokens: request.maxOutputTokens ?? defaults.maxOutputTokens ?? 8192,
|
|
156
|
-
system,
|
|
85
|
+
system: toAnthropicSystem(request.prompt),
|
|
157
86
|
messages: toAnthropicMessages(request.prompt),
|
|
158
|
-
temperature:
|
|
87
|
+
temperature: request.temperature,
|
|
159
88
|
tools: tools.length ? tools : undefined,
|
|
160
|
-
tool_choice: toolChoice,
|
|
161
|
-
thinking,
|
|
162
|
-
...(effort ? { output_config: { effort } } : {}),
|
|
89
|
+
tool_choice: request.tools?.length ? toAnthropicToolChoice(request.toolChoice) : undefined,
|
|
90
|
+
thinking: toAnthropicThinking(request.thinking, defaults.thinking),
|
|
163
91
|
};
|
|
164
92
|
}
|
|
165
93
|
function normalizeArguments(value) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anthropic-converter.js","sourceRoot":"","sources":["../../src/providers/anthropic-converter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"anthropic-converter.js","sourceRoot":"","sources":["../../src/providers/anthropic-converter.ts"],"names":[],"mappings":"AAYA,MAAM,eAAe,GAAoC;IACvD,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,CAAC;CACZ,CAAC;AAEF,SAAS,gBAAgB,CAAC,KAAkB;IAC1C,OAAO;QACL,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,KAAK,CAAC,GAAG;YACf,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE;YACjC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE,EAAE;KAC5E,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAwC,KAAQ,EAAE,KAA0B;IAC5F,OAAO,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AAC5E,CAAC;AA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O,CAAC,EAAE,CAAC;YACnF,SAAS,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/F,CAAC;IACH,CAAC;IAED,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,uBAAuB,IAAI,CAAC,CAAC;IAC/D,OAAO;QACL,KAAK;QACL,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,YAAY,EAAE,OAAO,CAAC,WAAW,IAAI,SAAS;QAC9C,KAAK,EAAE;YACL,WAAW,EAAE,OAAO,CAAC,KAAK,CAAC,YAAY;YACvC,YAAY,EAAE,OAAO,CAAC,KAAK,CAAC,aAAa;YACzC,WAAW,EACT,OAAO,CAAC,KAAK,CAAC,YAAY;gBAC1B,OAAO,CAAC,KAAK,CAAC,aAAa;gBAC3B,CAAC,OAAO,CAAC,KAAK,CAAC,2BAA2B,IAAI,CAAC,CAAC;gBAChD,WAAW;YACb,iBAAiB,EAAE,WAAW;SAC/B;QACD,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1C,GAAG,EAAE,OAAO;KACb,CAAC;AACJ,CAAC"}
|
package/dist/providers.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { anthropic } from './providers/anthropic.js';
|
|
2
2
|
export type { AnthropicProviderOptions } from './providers/anthropic.js';
|
|
3
|
-
export {
|
|
4
|
-
export type {
|
|
3
|
+
export { fromAnthropicMessage, toAnthropicMessages, toAnthropicRequest, toAnthropicSystem, toAnthropicToolChoice, } from './providers/anthropic-converter.js';
|
|
4
|
+
export type { AnthropicRequestDefaults } from './providers/anthropic-converter.js';
|
|
5
5
|
export { gemini, vertexAI } from './providers/google.js';
|
|
6
6
|
export type { GeminiProviderOptions, VertexAIProviderOptions } from './providers/google.js';
|
|
7
7
|
export { fromGoogleResponse, toGoogleContents, toGoogleRequest, toGoogleSystemInstruction, } from './providers/google-converter.js';
|
package/dist/providers.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { anthropic } from './providers/anthropic.js';
|
|
2
|
-
export {
|
|
2
|
+
export { fromAnthropicMessage, toAnthropicMessages, toAnthropicRequest, toAnthropicSystem, toAnthropicToolChoice, } from './providers/anthropic-converter.js';
|
|
3
3
|
export { gemini, vertexAI } from './providers/google.js';
|
|
4
4
|
export { fromGoogleResponse, toGoogleContents, toGoogleRequest, toGoogleSystemInstruction, } from './providers/google-converter.js';
|
|
5
5
|
export { openai, openaiCompatible } from './providers/openai.js';
|
package/dist/providers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.js","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,OAAO,EACL,oBAAoB,EACpB,
|
|
1
|
+
{"version":3,"file":"providers.js","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,yBAAyB,GAC1B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,GACd,MAAM,iCAAiC,CAAC"}
|