Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
98651fe
build(deps): bump hashgraph-online/ai-plugin-scanner-action (#176)
dependabot[bot] Nov 2, 2026
4c4bf80
build(deps-dev): bump @opencode-ai/plugin from 1.19.3 to 1.19.4 (#178)
dependabot[bot] Nov 2, 2026
dbb6b62
build(deps-dev): bump typescript-eslint from 8.71.2 to 8.72.0 (#179)
dependabot[bot] Nov 2, 2026
e8a0c39
build(deps): bump @opencode/plugin from 2.0.32 to 2.1.4 (#177)
dependabot[bot] Nov 2, 2026
4f74c94
docs: update OpenCode v2 compatibility badge
yuhp Nov 2, 2026
9260644
docs: streamline README (#187)
yuhp Nov 4, 2026
d15cf5c
build(deps-dev): bump @types/node from 26.6.5 to 26.6.6 (#181)
dependabot[bot] Nov 4, 2026
b338440
build(deps-dev): bump @opencode-ai/plugin from 1.19.4 to 1.19.5 (#182)
dependabot[bot] Nov 4, 2026
d9cf92f
build(deps-dev): bump typescript-eslint from 8.72.0 to 8.72.1 (#183)
dependabot[bot] Nov 4, 2026
1385495
build(deps): bump hashgraph-online/ai-plugin-scanner-action (#184)
dependabot[bot] Nov 4, 2026
9aef717
build(deps-dev): bump eslint from 10.13.0 to 10.14.0 (#186)
dependabot[bot] Nov 4, 2026
51ee63d
build(deps): bump @opencode/plugin from 2.1.4 to 2.2.5 (#185)
dependabot[bot] Nov 4, 2026
5398b69
Merge main into dev after v2.1.1 release
yuhp Nov 4, 2026
f0fefdf
docs: update plugin examples to v2.1.1 (#189)
yuhp Nov 4, 2026
8592be0
feat: add opt-in pruneMissing for models the provider no longer lists
sscarduzio Nov 6, 2026
d690b03
build(deps): bump hashgraph-online/ai-plugin-scanner-action (#193)
dependabot[bot] Nov 11, 2026
205efa0
build(deps-dev): bump globals from 17.13.0 to 17.14.0 (#195)
dependabot[bot] Nov 11, 2026
861e938
build(deps-dev): bump vitest from 5.0.5 to 5.1.0 (#197)
dependabot[bot] Nov 11, 2026
7ae6123
build(deps): bump @opencode/plugin from 2.2.5 to 2.2.6 (#196)
dependabot[bot] Nov 11, 2026
599e042
docs: add UberLLM provider configuration example (#198)
PSA-Team-source Nov 11, 2026
57abbad
Merge community config examples into dev
yuhp Nov 11, 2026
11081a5
Merge latest dev changes
yuhp Nov 11, 2026
60f4288
docs: update plugin examples to v2.1.2
yuhp Nov 11, 2026
d0396d9
docs: update OpenCode v2 compatibility badge
yuhp Nov 11, 2026
af371fe
docs: fix OpenCode v1 docs link
yuhp Nov 11, 2026
781a5e7
Merge main after v2.1.2 release
yuhp Nov 11, 2026
7a275ea
fix: keep pruned-catalog models whose modelID is listed; correct conf…
sscarduzio Nov 11, 2026
0ed478b
feat(models.dev): prefer provider-advertised token limits
Realmagnum Nov 13, 2026
027d368
Merge pull request #192 from sscarduzio/feat/prune-missing-models
yuhp Nov 16, 2026
7e20cca
perf: bundle the plugin SDKs so installs skip the dependency tree
stiwa-wrre Nov 16, 2026
b4c8798
Merge pull request #202 from stiwa-wrre/dev
yuhp Nov 17, 2026
0cb09b5
build: omit source maps from npm releases
yuhp Nov 17, 2026
6a54428
chore: ignore local agent instructions
yuhp Nov 17, 2026
1742c36
Merge remote-tracking branch 'origin/dev' into maintainer/pr-200-limi…
yuhp Nov 17, 2026
8c8133f
fix: normalize provider model limits consistently
yuhp Nov 17, 2026
8136fdb
Merge pull request #200 from Realmagnum/feat/provider-advertised-limits
yuhp Nov 17, 2026
4b7dbb4
chore: bump version to 2.2.0-rc.1
github-actions[bot] Nov 17, 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
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,10 @@ jobs:
- name: Build distribution
run: npm run compile

- name: Bundle dependency guards
run: |
npm run check:bundle
npm run check:notices

- name: Inspect npm package
run: npm pack --dry-run --ignore-scripts
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
dist/
meta/
.worktrees/
*.log
.DS_Store
Expand All @@ -9,4 +10,5 @@ opencode-debug.log
.cache/
coverage/
opencode.json*
AGENTS.md
docs/articles/
17 changes: 17 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@ feature branches -> dev -> release/vX.Y.Z -> main -> publish

Release branches are short-lived per-version branches. There is no long-lived `release` branch.

## Bundled Dependencies

`dist/runtime.js` and `dist/tui.js` bundle the OpenCode plugin SDKs (`@opencode/plugin`, and the type-only `@opencode-ai/plugin`) at build time, so the published package declares **no runtime or peer dependencies** and hosts install it without unpacking a dependency tree. Consequences for releases:

1. Bump the `@opencode/plugin` / `@opencode-ai/plugin` devDependencies when preparing a release if you want the published plugin to track a newer SDK; the bundled copy is otherwise frozen at the last bump.
2. Do not add entries to `dependencies`, `peerDependencies`, or `optionalDependencies`. Hosts materialize every installed dependency as individual files in their plugin cache (a previous external-SDK setup unpacked ~30k files per install). `npm run check:bundle` fails the build if a bundled output keeps an external import or the manifest declares installable dependencies again.
3. `npm run compile` regenerates `dist/THIRD-PARTY-NOTICES.md` from the esbuild metafiles: an inventory of every bundled package with its exact version and full license text, shipped inside the tarball. `npm run check:notices` (part of `validate:package`) fails if the file is stale or a bundled package has no license classification, and `scripts/release.ts` embeds the SDK versions it lists into the GitHub release notes.
4. Development builds (`npm run build`) retain source maps for debugging. Release publishing uses `npm run build:release`, which compiles without source maps and removes stale `.map` files before packaging. The `files` allowlist also excludes source maps as a final packaging safeguard.

## Release Validation

`npm run validate:package` (run by the publish path) checks the release contract introduced with the bundling change:

- `npm run check:bundle` — zero installable dependencies, SDKs bundled into the runtime.
- `npm run check:notices` — `dist/THIRD-PARTY-NOTICES.md` matches what the bundles actually contain.
- `test/types-consumer.test.ts` (via the test suites) — a clean consumer typechecks against the published package with nothing but ambient Node types installed.

## What the Workflows Do

### Release Workflow
Expand Down
27 changes: 8 additions & 19 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ Each provider can configure discovery behavior through `provider.<name>.options.
| `provider.<name>.options.modelsDiscovery.modelInfoEndpoint` | `string` | Override a format-specific metadata endpoint as an origin-relative path or complete URL. Defaults to `/v1/model/info` for `"litellm"`, `/api/v1/models` for `"lmstudio"`, and `/api/show` for `"ollama"`; for `"aiproxy"`, it overrides the models.dev fallback URL |
| `provider.<name>.options.modelsDiscovery.modelInfoFormat` | `string` | Model info response format. Currently supports `"aiproxy"`, `"bifrost"`, `"litellm"`, `"models.dev"`, `"vllm"`, `"lmstudio"`, `"llama-swap"`, `"omniroute"`, `"openrouter"`, and `"ollama"` |
| `provider.<name>.options.modelsDiscovery.filterNonChat` | `boolean` | When model info is available, skip models whose `model_info.mode` is not `chat`. Defaults to `true` |
| `provider.<name>.options.modelsDiscovery.pruneMissing` | `boolean` | OpenCode v2 only. Remove models from the provider's catalog when the provider's models endpoint doesn't list them by `id` or `modelID`, including ones excluded by the filters below. The plugin can't tell config-declared models from built-in ones, so any model it sees is pruned the same way; on OpenCode 2.2.5, models declared in `provider.<name>.models` were applied after the plugin and stayed. A failed refresh reuses the last successful list, and nothing is removed until one succeeds. Defaults to `false` |
| `provider.<name>.options.modelsDiscovery.models.includeRegex` | `string[]` | Shortcut regex allow-list for discovered model ids only |
| `provider.<name>.options.modelsDiscovery.models.excludeRegex` | `string[]` | Shortcut regex deny-list for discovered model ids only |
| `provider.<name>.options.modelsDiscovery.models.includeBy` | `{ field: string, equals: string \| number \| boolean \| null }[]` or `{ field: string, match: string }[]` | Allow-list for top-level raw provider model fields |
Expand Down Expand Up @@ -362,7 +363,7 @@ The plugin currently supports ten model info formats:
| `"aiproxy"` | AIProxy's discovered `/models` entries plus models.dev | No | Maps inline AIProxy limits, pricing, and declared effort tiers; models.dev supplies general metadata |
| `"bifrost"` | Fields in Bifrost's `/v1/models` response | No | Reads Bifrost inline limits, modalities, and base pricing when present |
| `"litellm"` | Provider-specific model info endpoint | No | Uses `/v1/model/info` by default; set `modelInfoEndpoint` to override it |
| `"models.dev"` | `https://models.dev/models.json` | No | Uses the public models.dev metadata index |
| `"models.dev"` | `https://models.dev/models.json` | No | Uses the public models.dev metadata index; limits advertised inline by the provider take precedence |
| `"vllm"` | Fields in the provider's `/v1/models` response | No | Reads vLLM-style `max_model_len` when present |
| `"lmstudio"` | LM Studio 0.4.0+ `/api/v1/models` inventory | No | Uses `/api/v1/models` by default; set `modelInfoEndpoint` for another path |
| `"llama-swap"` | Fields in llama-swap's `/v1/models` response | No | Reads inline context, modalities, and function-calling metadata when present |
Expand All @@ -374,7 +375,7 @@ The plugin currently supports ten model info formats:

### AIProxy Metadata

Use `modelInfoFormat: "aiproxy"` when the configured model-list endpoint returns AIProxy's inline `limits` and `pricing` fields. The plugin makes no second request to AIProxy. It also fetches models.dev for general metadata and display names, then overlays valid AIProxy values. Explicit model configuration remains highest priority.
Use `modelInfoFormat: "aiproxy"` when the configured model-list endpoint returns AIProxy's inline `limits` and `pricing` fields. The plugin makes no second request to AIProxy. It also fetches models.dev for general metadata and display names, then overlays valid AIProxy values. Limits advertised inline in the model-list entry are kept as the base, so they win over models.dev before the AIProxy `limits` block is applied. Explicit model configuration remains highest priority.

```jsonc
{
Expand Down Expand Up @@ -689,6 +690,8 @@ When a discovered model can be matched to models.dev metadata, the plugin may po

The current models.dev data uses a flat `provider/model`-keyed object. Its `limit` object is singular, and its `context`, `input`, and `output` fields are independently optional. `structured_output` and `temperature` may also be omitted; the plugin leaves omitted fields unset rather than inferring `false`. The current models.dev dataset does not provide `variants` metadata.

For gateways that expose inline limits on their `/v1/models` entries, those values take precedence over matching models.dev limits. The plugin reads `context_length` or `max_context_length` for the context window and `max_completion_tokens` or `max_output_tokens` for the output budget, then fills any remaining gap from models.dev. This keeps gateways that front several upstreams (for example a LiteLLM pool or a custom router) authoritative for what their own routes accept, while models.dev still supplies names and capabilities. A models.dev input limit is bounded by the effective context window.

Matching is intentionally conservative:

- Exact model ids are preferred.
Expand Down
Loading
Loading