Skip to content

v1.1.0 - Model Capability Enrichment & Combo Model Support

Latest

Choose a tag to compare

@Alph4d0g Alph4d0g released this 10 Mar 15:14
· 2 commits to main since this release

🚀 What's New

Model Capability Enrichment from models.dev

This release introduces automatic model metadata enrichment by integrating with models.dev API. Your OmniRoute models now automatically receive accurate context windows, token limits, and capability flags without manual configuration.

Key Features:

  • Automatic metadata lookup: Fetches model specs from models.dev's comprehensive database (102+ providers, ~2000 models)
  • Provider alias mapping: Seamlessly maps OmniRoute provider keys (, , ) to models.dev providers (, )
  • Smart caching: 24-hour TTL cache for models.dev data minimizes API calls
  • Graceful degradation: Works even when models.dev is unavailable or models aren't found

Combo Model Support

OmniRoute's combo models (virtual models that route to multiple underlying models) now automatically calculate their capabilities using a lowest common denominator approach:

  • Context Window: Minimum of all underlying models (prevents token overflow)
  • Max Tokens: Minimum of all underlying models (ensures safe output limits)
  • Vision Support: Only enabled if ALL underlying models support vision
  • Tool Support: Only enabled if ALL underlying models support tools

Example calculated capabilities:

Combo Model Context Max Tokens Vision Tools
Designer 204,800 32,768
Explorer 204,800 65,536
Oracle 128,000 32,000
Orchestrator 262,144 64,000

New Configuration Options

Enable/disable models.dev enrichment:

{
  provider: {
    omniroute: {
      options: {
        modelsDev: {
          enabled: true,  // default
          url: 'https://models.dev/api.json',
          timeoutMs: 1000,
          cacheTtl: 86400000,  // 24 hours
          providerAliases: {
            cx: 'openai',
            mycustom: 'anthropic'
          }
        }
      }
    }
  }
}

Custom model metadata overrides:

{
  provider: {
    omniroute: {
      options: {
        modelMetadata: [
          { match: /gpt-5\.3-codex$/i, contextWindow: 200000, maxTokens: 8192 },
          { match: 'virtual/my-custom-model', addIfMissing: true, contextWindow: 50000 }
        ]
      }
    }
  }
}

🐛 Bug Fixes

  • Fixed: modelsDev.enabled: false option now properly disables enrichment
  • Fixed: Optional chaining bug in `isComboModel()\ that threw TypeError when cache was null

📦 New API Exports

import {
  // Existing
  fetchModels,
  clearModelCache,
  refreshModels,
  // NEW: Combo model utilities
  clearComboCache,
  fetchComboData,
  resolveUnderlyingModels,
  calculateModelCapabilities
} from 'opencode-omniroute-auth/runtime';

📚 Documentation

  • Comprehensive README updates with combo model explanation
  • Configuration examples for JavaScript and JSON configs
  • New API documentation for runtime exports

🔧 Technical Details

  • New files: src/models-dev.ts (375 lines), src/omniroute-combos.ts (363 lines)
  • Modified: src/models.ts, src/plugin.ts, src/types.ts, src/constants.ts
  • Total changes: +1,210 lines across 9 files
  • Tested: End-to-end against local OmniRoute instance (all tests passing)

🔄 Migration Guide

No breaking changes - this release is fully backward compatible:

  • Existing configurations continue to work unchanged
  • models.dev enrichment is enabled by default but can be disabled
  • All new features are opt-in via configuration

📥 Installation

npm install opencode-omniroute-auth@1.1.0

🙏 Credits

Thanks to kilo-code-bot for the thorough code review that caught critical bugs before release!