@gajae-code/ai 0.17.4 → 0.17.6

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 CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.17.6] - 2026-09-24
6
+
7
+ ## [0.17.5] - 2026-09-24
8
+
9
+ ### Added
10
+
11
+ - `packages/ai/src/models.json` was regenerated against models.dev, bundling Claude Opus 5.5 across Anthropic (`claude-opus-5-5`), Bedrock (`anthropic.claude-opus-5-5` plus the `us.`/`eu.`/`au.`/`jp.`/`global.` inference profiles), OpenRouter, Vercel AI Gateway, Kilo, and Venice, alongside the rest of the upstream catalog drift (Grok 4.7, GLM 5.3 variants, Xiaomi MiMo V2.6 Flash/Pro/Pro-Ultraspeed, DeepSeek/Qwen token-plan rows). `VISION_CORRECTED_CLAUDE_OPUS_GENERATIONS` declares generation 5.5 so the new rows pass the Opus vision tripwire instead of silently bypassing the generator correction.
12
+ - Kiro bundles `claude-opus-5.5` (1M input / 128K output, text input only). Kiro's API-key request serializer drops images, so this model does not advertise image support until that transport can serialize them. Kiro's Anthropic model list is hand-maintained in `kiro-api-key.ts` rather than sourced from models.dev, so a regeneration alone left Kiro stranded on Opus 5 while every models.dev-backed provider advanced; the entry follows the existing dual dotted/dashed id convention already used for `claude-opus-4.5` through `4.8`.
13
+
14
+ ### Fixed
15
+
16
+ - openai-completions treats a `compat.extraBody` `tool_choice` as an endpoint default instead of an override: it fills the gap only on ordinary turns that offer tools and resolved no directive of their own, leaving forced-tool directives and deliberate no-tools turns untouched (strict backends reject `tool_choice` with an empty `tools` list). The default also passes through the provider's existing tool-choice reasoning suppression so endpoint defaults do not bypass compatibility flags.
17
+
18
+ - Cross-model assistant-history replay now collapses pathological runs of exact consecutive thinking paragraphs into one copy with the exact repeat count, preventing repeated reasoning from inflating custom OpenAI-compatible prompts while preserving stored history, final answers, tool content, and native same-model reasoning (#5805).
19
+
20
+ - Keep provider evidence stable when the same runtime, configured, or environment API key is resolved.
21
+
5
22
  ## [0.17.4] - 2026-09-23
6
23
 
7
24
  ### Added
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@gajae-code/ai",
4
- "version": "0.17.4",
4
+ "version": "0.17.6",
5
5
  "description": "Unified LLM API with automatic model discovery and provider configuration",
6
6
  "homepage": "https://gajae-code.com",
7
7
  "author": "Yeachan-Heo and Gajae Code Contributors",
@@ -41,8 +41,8 @@
41
41
  "@agentclientprotocol/sdk": "1.3.0",
42
42
  "@anthropic-ai/sdk": "^0.94.0",
43
43
  "@bufbuild/protobuf": "^2.12.0",
44
- "@gajae-code/natives": "0.17.4",
45
- "@gajae-code/utils": "0.17.4",
44
+ "@gajae-code/natives": "0.17.6",
45
+ "@gajae-code/utils": "0.17.6",
46
46
  "openai": "^6.36.0",
47
47
  "partial-json": "^0.1.7",
48
48
  "zod": "4.4.3"
@@ -1578,8 +1578,15 @@ export class AuthStorage {
1578
1578
  getProviderEvidenceGeneration(provider: string, resolvedApiKey?: string, owner?: object): string {
1579
1579
  const storageProvider = resolveOAuthStorageProvider(provider);
1580
1580
  provider = storageProvider;
1581
- const evidenceApiKey = resolvedApiKey;
1582
1581
  const configOverride = this.#configOverrideRegistration(storageProvider, owner);
1582
+ const runtimeOverride = this.#runtimeOverrides.get(storageProvider);
1583
+ const environmentOverride = runtimeOverride || configOverride?.apiKey ? undefined : getEnvApiKey(storageProvider);
1584
+ // Discovery callers may fingerprint the provider before resolving its
1585
+ // already-effective override or environment key, then pass that resolved
1586
+ // key on the live path. Use the same effective key for the omitted form
1587
+ // so both paths share one credential-sensitive generation.
1588
+ const evidenceApiKey =
1589
+ resolvedApiKey ?? (runtimeOverride || configOverride?.apiKey || environmentOverride || undefined);
1583
1590
  const storedLiteral =
1584
1591
  evidenceApiKey === undefined || this.#runtimeOverrides.has(storageProvider) || configOverride !== undefined
1585
1592
  ? undefined
@@ -1615,9 +1622,7 @@ export class AuthStorage {
1615
1622
  credential.type === "oauth" && Number.isFinite(credential.expires) && credential.expires > Date.now(),
1616
1623
  );
1617
1624
  const effectiveEnvKey =
1618
- this.#runtimeOverrides.get(provider) || configOverride?.apiKey || hasApiKey || hasUsableOAuth
1619
- ? undefined
1620
- : getEnvApiKey(provider);
1625
+ runtimeOverride || configOverride?.apiKey || hasApiKey || hasUsableOAuth ? undefined : getEnvApiKey(provider);
1621
1626
  const storedApiKeyFingerprint = credentials
1622
1627
  .filter(
1623
1628
  (credential): credential is Extract<AuthCredential, { type: "api_key" }> => credential.type === "api_key",