Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c0dcdcc
chore(release): open v3.8.17 development cycle
diegosouzapw Jun 8, 2026
eb86517
deps: bump electron from 42.3.2 to 42.3.3 in /electron (#3441)
dependabot[bot] Jun 8, 2026
de2420a
deps: bump the production group with 10 updates (#3444)
dependabot[bot] Jun 8, 2026
f01a0b0
deps: bump the development group with 4 updates (#3445)
dependabot[bot] Jun 8, 2026
d3ff0b3
deps: bump electron-updater from 6.8.8 to 6.8.9 in /electron (#3442)
dependabot[bot] Jun 8, 2026
70c6610
deps: bump electron-builder from 26.14.0 to 26.15.2 in /electron (#3443)
dependabot[bot] Jun 8, 2026
fc437dd
fix(sse): normalize provider ids to strings (#3427)
disafronov Jun 8, 2026
b3372e4
fix(command-code): revert chat endpoint to /alpha/generate and fix mo…
TapZe Jun 8, 2026
1e4185e
fix(analytics): scope SQL named params per query context (#3446) (#3447)
ReqX Jun 8, 2026
23f31fa
fix claude-web and cleanup (#3449)
androw Jun 8, 2026
ea0c0d8
feat: add ZenMux provider (Phase 2B of #3368) (#3429)
oyi77 Jun 8, 2026
07a81c8
feat: add LMArena provider (Phase 2A of #3368) (#3421)
oyi77 Jun 8, 2026
2427df2
feat: add Gemini Business provider (Phase 2C of #3368) (#3436)
oyi77 Jun 8, 2026
3c98e9f
fix: probe container bridge network IP in healthcheck (#3151) (#3434)
naimo84 Jun 8, 2026
858b674
fix(publish): remove onnxruntime CUDA binary from tarball to avoid 41…
herjarsa Jun 8, 2026
96e5ec9
docs(opencode-plugin): lead with the why — make plugin the recommende…
herjarsa Jun 8, 2026
a003666
docs: close critical documentation gaps (ACP, router strategies, APIs…
oyi77 Jun 8, 2026
89a76d8
fix(stream): allow OpenAI usage-only empty choices chunks (#3422)
xz-dev Jun 8, 2026
dbd70dd
fix(catalog): make combos auto-compute context_length for any provide…
herjarsa Jun 8, 2026
da273d3
fix(stream): resolve index mismatch in textual tool-call slicing and …
Ardem2025 Jun 8, 2026
1322411
feat(opencode-plugin): per-prefix API format + debug logging + free-l…
herjarsa Jun 8, 2026
617a648
fix(translator): use non-empty reasoning_content placeholder on cache…
ViFigueiredo Jun 8, 2026
003e6a8
feat(plugin+api): auto combos + free model quota display + /api/combo…
mrmm Jun 8, 2026
1a98dfe
test(auto-combo): cover same-provider connection identity (#3378)
oyi77 Jun 8, 2026
42887b6
feat: add connection pagination, health filter, batch delete confirma…
sdfsdfw2 Jun 8, 2026
cc85012
fix(translator): strip function_call.id for Vertex AI provider (#3440…
diegosouzapw Jun 8, 2026
ff65652
fix(claude): respect client anthropic-beta instead of forcing thinkin…
diegosouzapw Jun 8, 2026
4f38167
fix(catalog): surface imported models on no-auth providers in /api/v1…
diegosouzapw Jun 9, 2026
49c11f0
fix(browser): avoid bundling optional cloakbrowser import (#3460)
rdself Jun 9, 2026
1cc2313
fix(command-code): align CLI version header (#3462)
hevener10 Jun 9, 2026
5c3545b
Add Endpoint Token Saver visibility setting (#3461)
rdself Jun 9, 2026
ee0fdcb
docs(env): document COMMAND_CODE_VERSION override (#3462 follow-up)
diegosouzapw Jun 9, 2026
5001978
Add model catalog name feature flag (#3464)
rdself Jun 9, 2026
259486a
chore(release): v3.8.17 — 2026-06-09
diegosouzapw Jun 9, 2026
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
28 changes: 28 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,14 @@ APP_LOG_TO_FILE=true
# Default: 86400000 (24 hours)
# OPENROUTER_CATALOG_TTL_MS=86400000

# ── Model catalog response shape ──
# Include display-friendly name fields in /v1/models responses.
# Disable for clients that expect model IDs only.
# Defined in: src/shared/constants/featureFlagDefinitions.ts
# Used by: src/app/api/v1/models/catalog.ts
# Default: true
# MODEL_CATALOG_INCLUDE_NAMES=true

# ── NanoBanana (Image Generation) ──
# Polling config for async image generation jobs.
# Used by: open-sse/handlers/imageGeneration.ts
Expand Down Expand Up @@ -1275,6 +1283,13 @@ APP_LOG_TO_FILE=true
# Used by: src/app/api/providers/command-code/auth/shared.ts.
# COMMAND_CODE_CALLBACK_PORT=

# ── Command Code CLI version header ──
# Value sent as the x-command-code-version header to the Command Code upstream.
# Overrides the built-in default; bump if the upstream requires a newer CLI version.
# Used by: open-sse/executors/commandCode.ts
# Default: 0.33.2
# COMMAND_CODE_VERSION=0.33.2

# ── MITM debug proxy (development only) ──
# Used by: src/mitm/server.cjs — captures upstream traffic for inspection.
# MITM_LOCAL_PORT=443
Expand Down Expand Up @@ -1468,3 +1483,16 @@ QUOTA_STORE_DRIVER=sqlite # sqlite | redis
# QUOTA_SATURATION_THRESHOLD=0.5 # 0..1; >= threshold ativa modo strict (sem empréstimo)
# QUOTA_SOFT_DEPRIORITIZE_FACTOR=0.7 # 0..1; multiplicador do score quando soft policy ativa
# QUOTA_CONSUMPTION_RETENTION_DAYS=14 # GC de buckets quota_consumption.updated_at antigos

# ─── OpenCode config regeneration (scripts/ad-hoc/regen-opencode-config.ts) ───
# Base URL of the OmniRoute instance to query for /v1/models when regenerating
# an opencode.json with accurate limit.context values. Used by:
# scripts/ad-hoc/regen-opencode-config.ts. Default: http://localhost:20128
# OMNIROUTE_URL=
# API key to authenticate against the OmniRoute /v1/models endpoint. Falls back
# to OPENCODE_API_KEY when unset. Used by: scripts/ad-hoc/regen-opencode-config.ts.
# OMNIROUTE_KEY=
# OpenCode-style API key (sk-...) for the regenerated opencode.json. Used by:
# scripts/ad-hoc/regen-opencode-config.ts. Falls back to OMNIROUTE_KEY.
# OPENCODE_API_KEY=

1 change: 1 addition & 0 deletions .source/source.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var docs = defineDocs({
dir: "docs",
docs: {
files: [
"./getting-started/**/*.md",
"./architecture/**/*.md",
"./guides/**/*.md",
"./reference/**/*.md",
Expand Down
16 changes: 15 additions & 1 deletion @omniroute/opencode-plugin/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# @omniroute/opencode-plugin

First-class OpenCode plugin for the [OmniRoute AI Gateway](https://github.com/diegosouzapw/OmniRoute). Pulls a live model catalog from `/v1/models` (including `-low`/`-medium`/`-high`/`-thinking` variants as first-class IDs), aggregates combos via `/api/combos` using a least-common-denominator capability/limit join, sanitizes Gemini tool schemas in flight, and supports multiple side-by-side OmniRoute instances out of the box.
> **Recommended way to use OmniRoute with OpenCode.** Pulls a live model catalog from `/v1/models` (including `-low`/`-medium`/`-high`/`-thinking` variants as first-class IDs), aggregates combos via `/api/combos` using a least-common-denominator capability/limit join, sanitizes Gemini tool schemas in flight, and supports multiple side-by-side OmniRoute instances out of the box.

## Why this and not `@omniroute/opencode-provider`?

`@omniroute/opencode-provider` is the legacy config-generator package — it writes a frozen `provider.omniroute` block into `opencode.json` with a **hardcoded list of 8 models** ([`OMNIROUTE_DEFAULT_OPENCODE_MODELS`](https://github.com/diegosouzapw/OmniRoute/blob/main/%40omniroute/opencode-provider/src/index.ts#L48-L56)). It works on the CLI but in the **OpenCode Desktop / Web** builds (Tauri / Electron) the runtime re-runs the model picker and the static block surfaces only a few of those — and they drift behind the live OmniRoute catalog.

This plugin solves that by:

- Fetching `/v1/models` and `/api/combos` **at OpenCode startup, in Node.js** — no CORS, no WebView restrictions
- Emitting the provider block **dynamically** in the plugin's `config`/`provider` hook — so `opencode.json` only needs the plugin entry, not a static `provider.omniroute`
- Re-fetching on a configurable TTL (default 5 min), so new models / combo changes in the OmniRoute UI appear without restarting OpenCode
- Computing `limit.context` for combos as `min(member.context_length)` from the live catalog (no more `null` values that cause 4K-token truncation)
- **Auto-pickup of `interleaved` capability** for thinking models (merged via PR #3138)

**If you only have the legacy `opencode-provider` block in your `opencode.json`, replace it with a single plugin entry.** No other config changes required — the same `auth.json` API key works.

## Install

Expand Down
2 changes: 1 addition & 1 deletion @omniroute/opencode-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"scripts": {
"build": "tsup",
"clean": "rm -rf dist",
"test": "node --import tsx/esm --test tests/scaffold.test.ts tests/auth.test.ts tests/options-schema.test.ts tests/multi-instance.test.ts tests/fetch-interceptor.test.ts tests/provider.test.ts tests/gemini-sanitize.test.ts tests/combos.test.ts tests/config-shim.test.ts tests/features.test.ts tests/usable-combo.test.ts tests/disk-snapshot-perms.test.ts",
"test": "node --import tsx/esm --test tests/scaffold.test.ts tests/auth.test.ts tests/options-schema.test.ts tests/multi-instance.test.ts tests/fetch-interceptor.test.ts tests/provider.test.ts tests/gemini-sanitize.test.ts tests/combos.test.ts tests/config-shim.test.ts tests/features.test.ts tests/usable-combo.test.ts tests/disk-snapshot-perms.test.ts tests/fork-features.test.ts",
"prepublishOnly": "npm run clean && npm run build && npm test"
},
"keywords": [
Expand Down
Loading