diff --git a/README.md b/README.md index 5087032b..fa441471 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ OpenCode v2 uses `plugins` and `providers`. Discovery settings belong under `pro { "$schema": "https://opencode.ai/config.json", "plugins": [ - "opencode-models-discovery@2.1.2" + "opencode-models-discovery@2.2.0" ], "providers": { "gateway": { @@ -73,7 +73,7 @@ For OpenCode v1 (`1.18.29+`), use `plugin`, `provider`, and `options`: ```json { "$schema": "https://opencode.ai/config.json", - "plugin": ["opencode-models-discovery@2.1.2"], + "plugin": ["opencode-models-discovery@2.2.0"], "provider": { "lmstudio": { "npm": "@ai-sdk/openai-compatible", diff --git a/docs/config_example/a2agent.md b/docs/config_example/a2agent.md index f05c319c..fc43b582 100644 --- a/docs/config_example/a2agent.md +++ b/docs/config_example/a2agent.md @@ -12,7 +12,7 @@ This project is not affiliated with, endorsed by, or sponsored by [A2Agent](http { "$schema": "https://opencode.ai/config.json", "plugins": [ - "opencode-models-discovery@2.1.2" + "opencode-models-discovery@2.2.0" ], "providers": { "a2agent": { diff --git a/docs/config_example/ai-router.md b/docs/config_example/ai-router.md index ff637ad5..1a6eee33 100644 --- a/docs/config_example/ai-router.md +++ b/docs/config_example/ai-router.md @@ -12,7 +12,7 @@ This project is not affiliated with, endorsed by, or sponsored by [AI-ROUTER](ht { "$schema": "https://opencode.ai/config.json", "plugins": [ - "opencode-models-discovery@2.1.2" + "opencode-models-discovery@2.2.0" ], "providers": { "ai-router": { diff --git a/docs/config_example/deepseek.md b/docs/config_example/deepseek.md index b0403ef2..701c86b4 100644 --- a/docs/config_example/deepseek.md +++ b/docs/config_example/deepseek.md @@ -12,7 +12,7 @@ This project is not affiliated with, endorsed by, or sponsored by DeepSeek. { "$schema": "https://opencode.ai/config.json", "plugins": [ - "opencode-models-discovery@2.1.2" + "opencode-models-discovery@2.2.0" ], "providers": { "deepseek": { diff --git a/docs/config_example/uberllm.md b/docs/config_example/uberllm.md index 6fab1aef..18aa86ab 100644 --- a/docs/config_example/uberllm.md +++ b/docs/config_example/uberllm.md @@ -12,7 +12,7 @@ This project is not affiliated with, endorsed by, or sponsored by [UberLLM](http { "$schema": "https://opencode.ai/config.json", "plugins": [ - "opencode-models-discovery@2.1.2" + "opencode-models-discovery@2.2.0" ], "providers": { "uberllm": { diff --git a/docs/configuration.md b/docs/configuration.md index 13e06e59..97ff74d3 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -14,7 +14,7 @@ OpenCode v2 uses `plugins` and `providers`. The plugin can be declared directly { "$schema": "https://opencode.ai/config.json", "plugins": [ - "opencode-models-discovery@2.1.2" + "opencode-models-discovery@2.2.0" ], "providers": { "my-provider": { @@ -730,7 +730,7 @@ For providers with custom metadata paths or non-standard behavior: { "$schema": "https://opencode.ai/config.json", "plugins": [ - "opencode-models-discovery@2.1.2" + "opencode-models-discovery@2.2.0" ], "providers": { "lmstudio": { @@ -779,7 +779,7 @@ In this example: { "$schema": "https://opencode.ai/config.json", "plugins": [ - "opencode-models-discovery@2.1.2" + "opencode-models-discovery@2.2.0" ], "providers": { "ollama": { diff --git a/docs/connect-and-auth.md b/docs/connect-and-auth.md index d5704097..b5f1b3df 100644 --- a/docs/connect-and-auth.md +++ b/docs/connect-and-auth.md @@ -18,7 +18,7 @@ OpenCode v2 features a first-class Integration subsystem (`ctx.integration`) and { "$schema": "https://opencode.ai/config.json", "plugins": [ - "opencode-models-discovery@2.1.2" + "opencode-models-discovery@2.2.0" ], "providers": { "deepseek-custom": { @@ -83,7 +83,7 @@ OpenCode v1 does not have the V2 plugin integration API. Instead, the V1 adapter { "$schema": "https://opencode.ai/config.json", "plugin": [ - "opencode-models-discovery@2.1.2" + "opencode-models-discovery@2.2.0" ], "provider": { "test_provider": { diff --git a/docs/migrate-v1-to-v2.md b/docs/migrate-v1-to-v2.md index 987158f2..8203a4b6 100644 --- a/docs/migrate-v1-to-v2.md +++ b/docs/migrate-v1-to-v2.md @@ -9,7 +9,7 @@ OpenCode v2 is the stable, primary integration. The package contains separate ad | OpenCode v1 | OpenCode v2 | |---|---| | `plugin` | `plugins` | -| `plugin: ["opencode-models-discovery"]` | `plugins: ["opencode-models-discovery@2.1.2"]` | +| `plugin: ["opencode-models-discovery"]` | `plugins: ["opencode-models-discovery@2.2.0"]` | | `provider` | `providers` | | `provider..npm` | `providers..package` | | `provider..options` | `providers..settings` | @@ -64,7 +64,7 @@ The V1 package commonly uses: { "$schema": "https://opencode.ai/config.json", "plugins": [ - "opencode-models-discovery@2.1.2" + "opencode-models-discovery@2.2.0" ], "providers": { "gateway": { diff --git a/docs/releases/v2.2.0.md b/docs/releases/v2.2.0.md new file mode 100644 index 00000000..be049d7d --- /dev/null +++ b/docs/releases/v2.2.0.md @@ -0,0 +1,39 @@ +# v2.2.0 + +## Distribution and installation performance + +The package distribution is now self-contained at runtime: the required OpenCode plugin SDK code is bundled into the published JavaScript entries instead of being installed as a large dependency tree. This substantially reduces the number of files and unpacked size created in plugin caches, improving installation time on systems where antivirus software scans each file. + +Published packages use a release-specific build that omits source maps and excludes them from the npm tarball. Development builds continue to generate source maps for local debugging. + +## Provider-advertised model limits + +For the `models.dev` and `aiproxy` metadata formats, positive limits exposed inline by a provider take precedence over matching static catalog values when the provider exposes those fields. The plugin recognizes common context and output aliases, ignores malformed values, and continues to use models.dev for metadata fields that the provider does not supply. + +All normalized input and output limits are bounded by the effective context window. AIProxy inline limit overlays use the same normalization path, so they cannot bypass those bounds. + +## Package and release validation + +The published package now ships dependency-free public declarations for the root, `/server`, and `/tui` entries. CI validates clean-consumer TypeScript resolution, bundled dependency boundaries, and third-party license notices generated from the bundle metadata. + +## Compatibility + +- Existing OpenCode v1 configurations remain supported. +- OpenCode v2 remains the primary supported integration. +- Existing model-info formats continue to work; provider-advertised limits are used only when valid inline fields are present. +- The package continues to publish with no runtime or peer dependencies. + +## Validation + +Validated with: + +```bash +npm run lint +npm run typecheck +npm run test:run +npm run test:v1 +npm run test:v2 +npm run build:release +``` + +Pre-release validation passed with 47 test files and 377 tests. Lint reports existing `no-console` warnings but no errors. diff --git a/package-lock.json b/package-lock.json index 8f9e3d8d..04a826f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "opencode-models-discovery", - "version": "2.2.0-rc.1", + "version": "2.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "opencode-models-discovery", - "version": "2.2.0-rc.1", + "version": "2.2.0", "license": "MIT", "devDependencies": { "@eslint/js": "^10.0.1", diff --git a/package.json b/package.json index e5710f83..d073651c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "opencode-models-discovery", - "version": "2.2.0-rc.1", + "version": "2.2.0", "description": "OpenCode plugin for auto-discovery of OpenAI-compatible models with dynamic provider configuration", "type": "module", "main": "./dist/index.js",