Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) - SemVer.

## [Unreleased]

## [1.0.4] - 2026-10-20
## [1.0.5] - 2026-10-24

### Changed

- Lowered catalog cache TTL (`CATALOG_TTL_MS`) from 12h to 6h so upstream provider rotations, deprecations, and newly added free promo models are discovered twice as fast.



### Fixed

Expand Down
4 changes: 2 additions & 2 deletions README.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ mediante el editor de modelos de OpenCode v2:
`trial` en el nombre visible.
- **Ventana de contexto real** por modelo, y los modelos multimodales declaran entrada
`image`.
- **Funciona sin red.** El catalogo se cachea en disco (TTL 12h). Si Command Code esta
- **Funciona sin red.** El catalogo se cachea en disco (TTL 6h). Si Command Code esta
caido o no hay red, OpenCode arranca igual con el ultimo catalogo bueno en lugar de
quedarse con el proveedor vacio.

Expand Down Expand Up @@ -224,7 +224,7 @@ Kill switch en runtime para la higiene de conexion: crea un archivo centinela ll
| `<state>/commandcode-sanitizer.log` | Cada reparacion de payload en vuelo, con las correcciones aplicadas |
| `<state>/commandcode-watchdog.log` | Streams SSE abortados por inactividad |
| `<state>/commandcode-retries.log` | Reintentos de transporte de Command Code: sesion, agente, proveedor, modelo, tipo de error, status HTTP, numero de intento, delay del backoff y mensaje |
| `<state>/commandcode-models-cache.json` | Ultimo catalogo de modelos bueno (TTL 12h) |
| `<state>/commandcode-models-cache.json` | Ultimo catalogo de modelos bueno (TTL 6h) |

`<state>` por defecto es `~/.local/state/opencode`.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ through the OpenCode v2 model editor:
`trial` in the display name.
- **Advertised context window** is preserved per model, and vision-capable models
declare `image` input.
- **Offline-safe.** The catalog is cached on disk (12h TTL). If Command Code is
- **Offline-safe.** The catalog is cached on disk (6h TTL). If Command Code is
down or the network is unavailable, OpenCode still starts with the last known
good catalog instead of an empty provider.

Expand Down Expand Up @@ -218,7 +218,7 @@ Runtime kill switch for connection hygiene: create a sentinel file named
| `<state>/commandcode-sanitizer.log` | Every in-flight payload repair, with the fixes applied |
| `<state>/commandcode-watchdog.log` | Aborted stalled SSE streams |
| `<state>/commandcode-retries.log` | Command Code transport retries: session, agent, provider, model, error type, HTTP status, attempt number, backoff delay and message |
| `<state>/commandcode-models-cache.json` | Last known good model catalog (12h TTL) |
| `<state>/commandcode-models-cache.json` | Last known good model catalog (6h TTL) |

`<state>` defaults to `~/.local/state/opencode`.

Expand Down
2 changes: 1 addition & 1 deletion docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ chunk 1 arrives 60s inactivity window armed
```
/latest catalog (network, 10s timeout)
|
+-- ok --------> filter -> register -> write cache (12h TTL)
+-- ok --------> filter -> register -> write cache (6h TTL)
|
+-- fail ------> read cache -> register
|
Expand Down
4 changes: 2 additions & 2 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Files written under the state directory:
| `commandcode-sanitizer.log` | append | JSON lines, one per repaired payload |
| `commandcode-watchdog.log` | append | JSON lines, one per aborted stream |
| `commandcode-retries.log` | append | JSON lines, Command Code retries only |
| `commandcode-models-cache.json` | overwrite | `{ at, models[] }`, 12h TTL |
| `commandcode-models-cache.json` | overwrite | `{ at, models[] }`, 6h TTL |

Logs are append-only and never rotated by the plugin. At the observed event rate
(tens of lines per week) this is not a concern; if you want rotation, point
Expand All @@ -81,7 +81,7 @@ Logs are append-only and never rotated by the plugin. At the observed event rate
| Constant | Value | Location |
| --- | --- | --- |
| API request timeout | 10s | `DEFAULT_TIMEOUT_MS` in `src/client/api.ts` |
| Catalog cache TTL | 12h | `CATALOG_TTL_MS` in `src/client/api.ts` |
| Catalog cache TTL | 6h | `CATALOG_TTL_MS` in `src/client/api.ts` |
| SSE inactivity window | 60s | `WATCHDOG_TIMEOUT_MS` in `src/index.ts` |
| Default output limit per model | 16384 | `applyModelCatalog` in `src/index.ts` |

Expand Down
2 changes: 1 addition & 1 deletion docs/es/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ llega el chunk 1 se arma la ventana de inactividad de 60s
```
catalogo vivo (red, timeout 10s)
|
+-- ok --------> filtrar -> registrar -> escribir cache (TTL 12h)
+-- ok --------> filtrar -> registrar -> escribir cache (TTL 6h)
|
+-- falla -----> leer cache -> registrar
|
Expand Down
4 changes: 2 additions & 2 deletions docs/es/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Archivos escritos bajo el directorio de estado:
| `commandcode-sanitizer.log` | append | JSON lines, una por payload reparado |
| `commandcode-watchdog.log` | append | JSON lines, una por stream abortado |
| `commandcode-retries.log` | append | JSON lines, solo reintentos de Command Code |
| `commandcode-models-cache.json` | sobrescritura | `{ at, models[] }`, TTL 12h |
| `commandcode-models-cache.json` | sobrescritura | `{ at, models[] }`, TTL 6h |

Los logs son append-only y el plugin no los rota. A la tasa observada (decenas de
lineas por semana) no es un problema; si querés rotacion, apunta
Expand All @@ -81,7 +81,7 @@ lineas por semana) no es un problema; si querés rotacion, apunta
| Constante | Valor | Ubicacion |
| --- | --- | --- |
| Timeout de request a la API | 10s | `DEFAULT_TIMEOUT_MS` en `src/client/api.ts` |
| TTL de la cache del catalogo | 12h | `CATALOG_TTL_MS` en `src/client/api.ts` |
| TTL de la cache del catalogo | 6h | `CATALOG_TTL_MS` en `src/client/api.ts` |
| Ventana de inactividad SSE | 60s | `WATCHDOG_TIMEOUT_MS` en `src/index.ts` |
| Limite de salida por defecto | 16384 | `applyModelCatalog` en `src/index.ts` |

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opencode-commandcode",
"version": "1.0.4",
"version": "1.0.5",
"description": "Production-grade OpenCode plugin for Command Code: dynamic model discovery, stability hooks and quota telemetry",
"main": "index.ts",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion src/client/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const API_BASE = "https://api.commandcode.ai";
export const CLI_VERSION = "1.73.4";

const DEFAULT_TIMEOUT_MS = 10_000;
const CATALOG_TTL_MS = 12 * 60 * 60 * 1000;
const CATALOG_TTL_MS = 6 * 60 * 60 * 1000;

export interface CommandCodeModel {
id: string;
Expand Down
Loading