Skip to content
2 changes: 1 addition & 1 deletion .github/workflows/plugin-security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
persist-credentials: false

- name: Scan plugin
uses: hashgraph-online/ai-plugin-scanner-action@9b169fc65d09b24726b66d70b3563ab563158b58 # v1.2.816
uses: hashgraph-online/ai-plugin-scanner-action@013b123a036a252a6d74ddb52836ee923498150c # v1.2.817
with:
plugin_dir: "."
min_score: 80
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion docs/config_example/a2agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion docs/config_example/ai-router.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion docs/config_example/deepseek.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion docs/config_example/uberllm.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
6 changes: 3 additions & 3 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions docs/connect-and-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions docs/migrate-v1-to-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<id>.npm` | `providers.<id>.package` |
| `provider.<id>.options` | `providers.<id>.settings` |
Expand Down Expand Up @@ -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": {
Expand Down
43 changes: 43 additions & 0 deletions docs/releases/v2.2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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.

## Configurable catalog pruning

OpenCode v1 providers can opt into `pruneMissing` in their `modelsDiscovery` settings. When enabled, models previously supplied by the plugin are removed when they are no longer present in the provider's current model list. The option is disabled by default, preserving existing behavior for providers whose model lists are incomplete or transient.

## 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.
Loading
Loading