@sayknow-cli/ai 0.5.26 → 0.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/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.6.0] - 2026-09-24
6
+ ### Fixed
7
+ - Retire `anthropic/claude-3-haiku-20240307`, `claude-3-5-sonnet-20240620` and `claude-3-5-sonnet-20241022`: the Anthropic API answers 404 `not_found_error` for all three (measured 2026-09-23 with a forced tool call). Left in the catalog, the cheapest of them was the first pick for typed decisions on every registry with an Anthropic key.
8
+ - The on-disk model cache now filters retired keys on read. A row written before a retirement carried the dead entry for up to the TTL and the catalog merge brought it straight back.
9
+
5
10
  ## [0.5.26] - 2026-09-23
6
11
  ### Fixed
7
12
  - API-key `/login` now upserts a second key instead of replacing the whole provider pool. Same-key re-login still reuses the existing row.
@@ -1,4 +1,4 @@
1
- export declare const RETIRED_MODEL_KEYS: readonly ["google-antigravity/gemini-3.1-pro-high"];
1
+ export declare const RETIRED_MODEL_KEYS: readonly ["google-antigravity/gemini-3.1-pro-high", "anthropic/claude-3-haiku-20240307", "anthropic/claude-3-5-sonnet-20240620", "anthropic/claude-3-5-sonnet-20241022"];
2
2
  export declare function isRetiredModelKey(provider: string, modelId: string): boolean;
3
3
  export declare function isRetiredModel(model: {
4
4
  provider: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@sayknow-cli/ai",
4
- "version": "0.5.26",
4
+ "version": "0.6.0",
5
5
  "description": "Unified LLM API with automatic model discovery and provider configuration",
6
6
  "homepage": "https://sayknow-cli.com",
7
7
  "author": "jaybeyond",
@@ -43,7 +43,7 @@
43
43
  "dependencies": {
44
44
  "@anthropic-ai/sdk": "^0.94.0",
45
45
  "@bufbuild/protobuf": "^2.12.0",
46
- "@sayknow-cli/utils": "0.5.26",
46
+ "@sayknow-cli/utils": "0.6.0",
47
47
  "openai": "^6.36.0",
48
48
  "partial-json": "^0.1.7",
49
49
  "zod": "4.4.3"
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import { Database } from "bun:sqlite";
6
6
  import { getModelDbPath } from "@sayknow-cli/utils/dirs";
7
+ import { isRetiredModelKey } from "./model-retirements";
7
8
  import type { Api, Model } from "./types";
8
9
 
9
10
  const CACHE_SCHEMA_VERSION = 3;
@@ -96,7 +97,12 @@ export function readModelCache<TApi extends Api>(
96
97
  if (!row || row.version !== CACHE_SCHEMA_VERSION) {
97
98
  return null;
98
99
  }
99
- const models = JSON.parse(row.models) as Model<TApi>[];
100
+ // A row written before a model was retired still carries it for up to the TTL;
101
+ // the bundled catalog filters retirements, so the cache must too or the merge
102
+ // brings the dead entry straight back.
103
+ const models = (JSON.parse(row.models) as Model<TApi>[]).filter(
104
+ model => !isRetiredModelKey(model.provider ?? providerId, model.id),
105
+ );
100
106
  const ageMs = now() - row.updated_at;
101
107
  const fresh = Number.isFinite(ageMs) && ageMs >= 0 && ageMs <= ttlMs;
102
108
  return {
@@ -1,6 +1,18 @@
1
- // Retired from advertised catalogs because Cloud Code Assist rejects live calls
2
- // with HTTP 400. The callable high-thinking path is gemini-3.1-pro-low:high.
3
- export const RETIRED_MODEL_KEYS = ["google-antigravity/gemini-3.1-pro-high"] as const;
1
+ // Retired from advertised catalogs because the provider rejects live calls.
2
+ //
3
+ // google-antigravity/gemini-3.1-pro-high: Cloud Code Assist answers HTTP 400. The
4
+ // callable high-thinking path is gemini-3.1-pro-low:high.
5
+ //
6
+ // anthropic/claude-3-*: the Anthropic API answers 404 `not_found_error` for all three
7
+ // (measured 2026-09-23 with a forced tool call). Left in the catalog, the cheapest of
8
+ // them ($0.25/MTok) was the first pick for typed decisions, so the "small hosted model"
9
+ // fallback silently answered nothing on every registry that had an Anthropic key.
10
+ export const RETIRED_MODEL_KEYS = [
11
+ "google-antigravity/gemini-3.1-pro-high",
12
+ "anthropic/claude-3-haiku-20240307",
13
+ "anthropic/claude-3-5-sonnet-20240620",
14
+ "anthropic/claude-3-5-sonnet-20241022",
15
+ ] as const;
4
16
 
5
17
  const RETIRED_MODEL_KEY_SET = new Set<string>(RETIRED_MODEL_KEYS);
6
18