@cloudpeers-jkl/model-router 0.2.0 → 0.2.1

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.
@@ -48,8 +48,10 @@ export function anthropicAdapter() {
48
48
  body: buildBody(req, false),
49
49
  signal: controller.signal,
50
50
  });
51
- if (!res.ok)
52
- throw new Error(`Anthropic ${res.status}`);
51
+ if (!res.ok) {
52
+ const detail = await res.text().then((t) => t.slice(0, 300)).catch(() => '');
53
+ throw new Error(`Anthropic ${res.status}${detail ? `: ${detail}` : ''}`);
54
+ }
53
55
  const data = (await res.json());
54
56
  if (!data.content?.length)
55
57
  throw new Error('Anthropic returned empty content');
package/dist/policy.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export const TIERS = {
2
2
  0: { tier: 0, provider: 'selfhosted', model: process.env.MODEL_ROUTER_TIER0_MODEL || 'openmed-extraction', cloud: false },
3
- 1: { tier: 1, provider: 'gemini', model: process.env.MODEL_ROUTER_GEMINI_MODEL || 'gemini-2.0-flash-exp', cloud: true },
3
+ 1: { tier: 1, provider: 'gemini', model: process.env.MODEL_ROUTER_GEMINI_MODEL || 'gemini-2.5-flash', cloud: true },
4
4
  2: { tier: 2, provider: 'anthropic', model: process.env.MODEL_ROUTER_ANTHROPIC_MODEL || 'claude-haiku-4-5', cloud: true },
5
5
  };
6
6
  /** Static routing table (confidence v1): tier chain per task class, in order. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudpeers-jkl/model-router",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "cloudpeers inference router — embedded library (no central data plane). Sovereignty privacy gate, static task-class routing, Anthropic Messages lingua franca, uniform metering.",
5
5
  "type": "module",
6
6
  "license": "MIT",