Skip to content

v2.4.0

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Dec 01:51
· 1 commit to dev since this release
b583fe5

v2.4.0

modelInfoAliases for models.dev lookups

Added modelsDiscovery.modelInfoAliases (Record<string, string>), allowing providers that expose renamed or plan-specific model IDs to map directly to canonical models.dev catalog keys:

  • Applies to "models.dev" and "aiproxy" (which composes models.dev metadata); provider-specific formats remain unaffected.
  • Matches exact discovered IDs and :tag-stripped IDs; an explicit alias replaces the lookup without falling back to the original ID, while inline provider-advertised limits still take precedence.
  • On OpenCode v2, changing an alias invalidates cached enrichments for that provider; reordering the same entries does not.
  • Validated in OpenCode v1 (validateConfig) and parsed defensively in OpenCode v2 (parseProviderDiscoveryOptions).

New & enhanced modelInfoFormat options

Three new formats bring the total to 13. Existing litellm configurations keep their original behavior; omniroute users should note the filtering change below. See the configuration guide for examples.

  • "gproxy": Inline-first GPROXY metadata enricher supporting limits, modalities, tool parameters, and reasoning levels, with an optional single-request catalog supplement when modelInfoEndpoint is configured.
  • "localai": Enriches models from LocalAI's /v1/models/capabilities endpoint (context_size, input/output modalities, and chat/vision/tools/thinking capability flags).
  • "litellm-inline": Combines /v1/models inline mode and token limits with /v1/model/info capability flags (supports_vision, supports_reasoning, supports_function_calling) and output limit fallback, keeping "litellm" unchanged for existing setups.
  • "omniroute" enhancements: Falls back to max_input_tokens for the context window. With filterNonChat enabled (the default), entries declaring a non-chat mode are skipped; entries without a mode are kept. Set filterNonChat: false to keep non-chat entries too.

Documentation & Acknowledgments

  • Documented all 13 modelInfoFormat options, capability mappings, and modelInfoAliases across README.md, docs/configuration.md, and /models-discovery:config.
  • Added an Acknowledgments section in README.md crediting opencode-lmstudio.

Dependency & CI updates

  • Updated development tooling: eslint@10.16.0, typescript-eslint@8.74.0, vitest@5.1.2, @vitest/coverage-v8@5.1.2, @types/node@26.6.11.
  • Updated hashgraph-online/ai-plugin-scanner-action to 1.2.821.
  • The runtime still bundles @opencode/plugin@2.3.2; the v1 SDK (@opencode-ai/plugin) is used for types only.

Compatibility

  • On OpenCode v2, discovery no longer forces compatibility.reasoningField to reasoning_content for reasoning models. This lets the host replay the gateway's reasoning fields (including structured reasoning or signatures) in subsequent turns. Reasoning capabilities and effort variants are unchanged (#243).
  • Existing OpenCode v1 configurations remain supported.
  • OpenCode v2 remains the primary supported integration.
  • The package continues to publish with no runtime or peer dependencies.