@tangle-network/agent-interface 5.10.14 → 5.10.15

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.
@@ -26,8 +26,9 @@ export declare function modelProvider(modelId: string): string | null;
26
26
  * sentinel, whose provider only the serving harness knows.
27
27
  */
28
28
  export declare function resolveModelProvider(modelId: string): string | null;
29
- /** The providers a harness is locked to, or `null` when it is router-backed (any model). */
30
- export declare function harnessProviders(harness: HarnessType): readonly string[] | null;
29
+ /** Always `null`: every harness is router-backed (Claude Code and Codex translate non-vendor models;
30
+ * Kimi Code's managed provider sends chat completions to the Router). Credentials are not modeled. */
31
+ export declare function harnessProviders(_harness: HarnessType): readonly string[] | null;
31
32
  /** A harness × model pair that a production run measured to fail at its first model call. */
32
33
  export interface HarnessModelExclusion {
33
34
  readonly harness: HarnessType;
@@ -67,8 +68,6 @@ export type HarnessModelSupport = {
67
68
  readonly supported: false;
68
69
  readonly model: string;
69
70
  readonly provider: string | null;
70
- /** The providers a vendor-locked harness accepts; absent for a measured exclusion. */
71
- readonly allowedProviders?: readonly string[];
72
71
  /** The measurement behind a refusal of a router-backed pair. */
73
72
  readonly exclusion?: HarnessModelExclusion;
74
73
  /** One sentence naming the harness, the model and the reason. */
@@ -81,9 +80,8 @@ export interface HarnessModelSupportOptions {
81
80
  /**
82
81
  * Whether a harness can run a model, and why not. A bare id resolves its provider through
83
82
  * {@link resolveModelProvider}; an id whose provider cannot be resolved (a sentinel like `default`)
84
- * is left to the harness, because its provider only the serving harness knows. A vendor-locked
85
- * harness refuses every other provider; a router-backed harness refuses only the measured
86
- * {@link harnessModelExclusions}.
83
+ * is left to the harness, because its provider only the serving harness knows. Only the measured
84
+ * {@link harnessModelExclusions} are refused.
87
85
  */
88
86
  export declare function harnessModelSupport(harness: HarnessType, modelId: string, options?: HarnessModelSupportOptions): HarnessModelSupport;
89
87
  /**
@@ -37,16 +37,6 @@ export function formatSeatSpec(seat) {
37
37
  return value;
38
38
  }
39
39
  // ── Harness ↔ model compatibility ────────────────────────────────────────────
40
- /**
41
- * Vendor locks, before the measured {@link harnessModelExclusions}. Absent means router-backed.
42
- * Claude Code and Codex run any Router model: their native vendor wire passes through for vendor
43
- * models and translates others to chat completions (including images/tools; hosted tools drop).
44
- * Kimi Code on a managed box writes an `openai_legacy` provider that sends chat completions to the
45
- * Router, so it runs any Router model too. A caller's vendor key/login remains vendor-limited;
46
- * this table does not know credentials. {@link vendorHarness} chooses a default harness; it is not
47
- * a provider restriction.
48
- */
49
- const harnessProviderLock = {};
50
40
  /**
51
41
  * The harness that natively speaks a vendor's models. A model of that vendor adopts it when the
52
42
  * caller names no harness ({@link preferredHarnessForModel}), and a locked harness handed such a
@@ -93,9 +83,10 @@ export function resolveModelProvider(modelId) {
93
83
  }
94
84
  return null;
95
85
  }
96
- /** The providers a harness is locked to, or `null` when it is router-backed (any model). */
97
- export function harnessProviders(harness) {
98
- return harnessProviderLock[harness] ?? null;
86
+ /** Always `null`: every harness is router-backed (Claude Code and Codex translate non-vendor models;
87
+ * Kimi Code's managed provider sends chat completions to the Router). Credentials are not modeled. */
88
+ export function harnessProviders(_harness) {
89
+ return null;
99
90
  }
100
91
  const SANDBOX_HARNESS_MATRIX_EVIDENCE = "https://github.com/tangle-network/agent-container/issues/9382";
101
92
  /**
@@ -141,9 +132,8 @@ export const harnessModelExclusions = [
141
132
  /**
142
133
  * Whether a harness can run a model, and why not. A bare id resolves its provider through
143
134
  * {@link resolveModelProvider}; an id whose provider cannot be resolved (a sentinel like `default`)
144
- * is left to the harness, because its provider only the serving harness knows. A vendor-locked
145
- * harness refuses every other provider; a router-backed harness refuses only the measured
146
- * {@link harnessModelExclusions}.
135
+ * is left to the harness, because its provider only the serving harness knows. Only the measured
136
+ * {@link harnessModelExclusions} are refused.
147
137
  */
148
138
  export function harnessModelSupport(harness, modelId, options = {}) {
149
139
  const trimmed = modelId.trim();
@@ -153,19 +143,6 @@ export function harnessModelSupport(harness, modelId, options = {}) {
153
143
  : trimmed;
154
144
  if (provider === null)
155
145
  return { supported: true, model, provider };
156
- const allowedProviders = harnessProviders(harness);
157
- if (allowedProviders && !allowedProviders.includes(provider)) {
158
- return {
159
- supported: false,
160
- model,
161
- provider,
162
- allowedProviders,
163
- message: `Harness ${harness} runs only ${allowedProviders.join(" or ")} models, ` +
164
- `not ${model} (provider ${provider}). Choose a model whose id starts with ` +
165
- `${allowedProviders.map((p) => `${p}/`).join(" or ")}, or a harness that runs ` +
166
- `${provider} models, such as opencode.`,
167
- };
168
- }
169
146
  const reasoning = options.reasoningEffort !== undefined &&
170
147
  options.reasoningEffort !== null &&
171
148
  options.reasoningEffort !== "none";
@@ -14,6 +14,10 @@ const deepseekModel = source("https://api-docs.deepseek.com/quick_start/pricing/
14
14
  const deepseekThinking = source("https://api-docs.deepseek.com/guides/thinking_mode/", "Thinking mode toggle and effort control; tool calls");
15
15
  const glmModel = source("https://docs.z.ai/guides/llm/glm-5.3#feature-changes", "Feature changes");
16
16
  const kimiModel = source("https://platform.kimi.ai/docs/guide/kimi-k3-quickstart", "Reasoning effort; vision input; important limits");
17
+ /** `opencode models opencode --verbose` on OpenCode 1.18.33: the keyless free routes, all priced at 0. */
18
+ function opencodeFreeClaim(route, limits) {
19
+ return claim(`OpenCode serves ${route} keyless (no provider key), at zero cost: ${limits}. A free route can change or leave the catalog without notice.`, { url: "https://opencode.ai/inference/openai/v1", checkedAt: "2026-11-02", authority: "local", locator: `opencode 1.18.33 models opencode --verbose; ${route}` }, "local-observation");
20
+ }
17
21
  /** Historical acceptance records, not a current serving or quality check. */
18
22
  function routerClaim(note) {
19
23
  return claim(`The 2026-09-22 record reports ${note}; this audit recovered no attached trace and made no new router request.`, {
@@ -223,14 +227,23 @@ export const profileKbModels = [
223
227
  id: "deepseek-v4.1-flash",
224
228
  name: "DeepSeek V4.1 Flash",
225
229
  vendor: "DeepSeek",
226
- surfaces: ["api", "router"],
227
- aliases: ["deepseek-flash", "deepseek/deepseek-v4.1-flash"],
230
+ surfaces: ["api", "router", "opencode"],
231
+ aliases: ["deepseek-flash", "deepseek/deepseek-v4.1-flash", "opencode/deepseek-v4.1-flash-free"],
228
232
  claims: [
229
233
  claim("DeepSeek API ID deepseek-flash denotes V4.1-Flash: 1M context, 384K output, vision and tools; non-thinking mode is available. Router naming is a separate contract.", deepseekModel),
230
234
  claim("Thinking defaults on at high. Native efforts are low, high and max; minimal maps to low, medium/xhigh to high, and ultra to max. With tools, preserve all previous reasoning_content, including turns without tool calls.", deepseekThinking),
231
235
  routerClaim("deepseek/deepseek-v4.1-flash returned HTTP 200 and served that id"),
236
+ opencodeFreeClaim("opencode/deepseek-v4.1-flash-free", "200K context, 32K output, image input, efforts low, high and max"),
232
237
  ],
233
238
  }),
239
+ kbEntry({
240
+ id: "glm-5.3-flash",
241
+ name: "GLM-5.3-Flash",
242
+ vendor: "Z.ai",
243
+ surfaces: ["opencode"],
244
+ aliases: ["opencode/glm-5.3-flash-free"],
245
+ claims: [opencodeFreeClaim("opencode/glm-5.3-flash-free", "200K context, 32K output, image input, efforts low, high and max")],
246
+ }),
234
247
  kbEntry({
235
248
  id: "glm-5.3",
236
249
  name: "GLM-5.3",
@@ -38,7 +38,7 @@ export interface ProfileKbHarness {
38
38
  claims?: ProfileKbClaim[];
39
39
  }
40
40
  /** Where a model is reached. A model id means different things on each surface. */
41
- export type ProfileKbSurface = "api" | "codex" | "chatgpt" | "router";
41
+ export type ProfileKbSurface = "api" | "codex" | "chatgpt" | "router" | "opencode";
42
42
  /**
43
43
  * How to get the best from one model.
44
44
  *
@@ -443,8 +443,10 @@ export const agentProfileSchema = z
443
443
  context.addIssue({ code: "custom", path: ["seats", 0, "permissions"], message: "first seat permissions must match profile permissions" });
444
444
  }
445
445
  for (const [index, seat] of profile.seats.entries()) {
446
- // The bare id's family provider (`glm-5.3` → `zai`), or a spelling the knowledge base lists (opencode's `zai-coding-plan/glm-5.3`).
447
- if (resolveModelProvider(seat.model) !== seat.provider && !profileKbNamesModel(`${seat.provider}/${seat.model}`)) {
446
+ // The model's own provider (prefix or bare-id family), a spelling the knowledge base lists (`zai-coding-plan/glm-5.3`,
447
+ // keyless `opencode/glm-5.3-flash-free`), or any provider for a model outside every family (`opencode/big-pickle`).
448
+ const owner = resolveModelProvider(seat.model);
449
+ if (owner !== null && owner !== seat.provider && !profileKbNamesModel(`${seat.provider}/${seat.model}`)) {
448
450
  context.addIssue({ code: "custom", path: ["seats", index, "provider"], message: "seat provider must match the model provider" });
449
451
  }
450
452
  if (!harnessHonorsModel(seat.harness)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-interface",
3
- "version": "5.10.14",
3
+ "version": "5.10.15",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",