free-coding-models 0.5.70 → 0.5.72

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/README.md CHANGED
@@ -484,7 +484,7 @@ Then restart Pi. The extension loads automatically. Requires Pi + `free-coding-m
484
484
  | `/fcm-router` | Connect Pi to the local FCM Smart Router daemon |
485
485
  | `/fcm-status` | Diagnostics: active model, last scan source, daemon state |
486
486
 
487
- **Composite ranking** — SWE-bench (60%) + Latency (20%) + TPS (10%) + Stability (10%). Tiny-context Cerebras models (~8k total tokens) are hidden from Pi/OpenCode pickers since they pass a `hi` probe but fail real agent prompts.
487
+ **Composite ranking** — SWE-bench (60%) + Latency (20%) + TPS (10%) + Stability (10%). Cerebras free-tier models are capped at ~64-65k total tokens (paid tier gets 131k) and are hidden from Pi/OpenCode pickers when they fail real agent prompts.
488
488
 
489
489
  → Full architecture: [`packages/fcm-pi/README.md`](./packages/fcm-pi/README.md)
490
490
 
@@ -0,0 +1,11 @@
1
+ # Changelog v0.5.71 - 2026-08-15
2
+
3
+ ### Fixed
4
+ - **Goose launch wrote a hardcoded 128k context limit** — when launching a model into Goose with `--goose` (or via the TUI Enter flow), the generated `~/.config/goose/custom_providers/fcm-<provider>.json` always set `context_limit: 128000`, ignoring the model's real context window. Models with larger contexts (e.g. MiniMax M3, 1M) were silently capped at 128k, and free-tier models with smaller limits (e.g. Cerebras 64-65k) were advertised above what the API actually allows. The launcher now uses the same `parseContextWindow(model.ctx)` logic as the Install Endpoints flow, so the context limit always matches the catalog value. (Fixes GitHub issue #153)
5
+ - **Stale Cerebras context references in docs** — README.md, packages/fcm-pi/README.md, and the Pi integration docs claimed Cerebras free tier has an "~8k total token limit". Per the official Cerebras Inference docs the free tier now caps context at ~64-65k (paid tier gets 131k). Docs updated to match.
6
+
7
+ ### Changed
8
+ - `parseContextWindow` is now exported from `src/core/endpoint-installer.js` so the Goose launcher (`src/core/tool-launchers.js`) and the Install Endpoints flow share the same single source of truth for context parsing.
9
+
10
+ ### Tests
11
+ - 797/797 tests passing, including a new regression assertion that a 1M-context model launched into Goose produces `context_limit: 1000000` in the generated provider file.
@@ -0,0 +1,7 @@
1
+ # Changelog v0.5.72 - 2026-08-15
2
+
3
+ ### Fixed
4
+ - **HTTP 529 (Service overloaded) now triggers failover** — when an upstream provider returns 529, the router previously passed the error straight to the client instead of failing over to the next model in the priority chain. Clients like OpenCode saw `unknown [retrying attempt #3]` because every retry hit the same overloaded upstream. 529 is now part of the retryable status set (`[429, 500, 502, 503, 529]`) so it cascades to the next model, matching the behavior of 429/500/502/503 in both the streaming and non-streaming code paths. (Fixes GitHub issue #148)
5
+
6
+ ### Tests
7
+ - 799/799 tests passing, including two new regression tests covering 529 failover for non-streaming and streaming requests (priority-1 model returns 529 → request succeeds via priority-2 model).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "free-coding-models",
3
- "version": "0.5.70",
3
+ "version": "0.5.72",
4
4
  "description": "Find the fastest coding LLM models in seconds — ping free models from multiple providers, pick the best one for OpenCode, Cursor, or any AI coding assistant.",
5
5
  "keywords": [
6
6
  "nvidia",
@@ -147,7 +147,7 @@ function getManagedProviderLabel(providerKey) {
147
147
  return `FCM ${getProviderLabel(providerKey)}`
148
148
  }
149
149
 
150
- function parseContextWindow(ctx) {
150
+ export function parseContextWindow(ctx) {
151
151
  if (typeof ctx !== 'string' || !ctx.trim()) return 128000
152
152
  const trimmed = ctx.trim().toLowerCase()
153
153
  const multiplier = trimmed.endsWith('m') ? 1_000_000 : trimmed.endsWith('k') ? 1_000 : 1
@@ -124,7 +124,7 @@ const MAX_PROBE_WINDOW = 20
124
124
  const TOKEN_FLUSH_INTERVAL_MS = 60000
125
125
  const CONFIG_RELOAD_INTERVAL_MS = 10000
126
126
  const STATS_RETENTION_DAYS = 90
127
- const RETRYABLE_STATUS_CODES = new Set([429, 500, 502, 503])
127
+ const RETRYABLE_STATUS_CODES = new Set([429, 500, 502, 503, 529])
128
128
  const AUTH_STATUS_CODES = new Set([401, 403])
129
129
  const RATE_LIMIT_HEADER_NAMES = [
130
130
  'retry-after',
@@ -49,6 +49,7 @@ import { getToolMeta, TOOL_METADATA } from './tool-metadata.js'
49
49
  import { PROVIDER_METADATA } from './provider-metadata.js'
50
50
  import { resolveToolBinaryPath } from './tool-bootstrap.js'
51
51
  import { ensureDir, readJson, writeJson } from './shared-helpers.js'
52
+ import { parseContextWindow } from './endpoint-installer.js'
52
53
 
53
54
  const OPENAI_COMPAT_ENV_KEYS = [
54
55
  'OPENAI_API_KEY',
@@ -338,7 +339,7 @@ function writeGooseConfig(model, apiKey, baseUrl, providerKey, paths = getDefaul
338
339
  description: `Managed by free-coding-models for ${providerLabel}`,
339
340
  api_key_env: secretEnvName,
340
341
  base_url: baseUrl?.endsWith('/chat/completions') ? baseUrl : (baseUrl || ''),
341
- models: [{ name: model.modelId, context_limit: 128000 }],
342
+ models: [{ name: model.modelId, context_limit: parseContextWindow(model.ctx) }],
342
343
  supports_streaming: true,
343
344
  requires_auth: true,
344
345
  }