Release v1.2.1#24
Conversation
OmniRoute 3.7.9 does not expose contextWindow/context_length/max_input_tokens in /v1/models responses. When these fields are missing, the plugin falls back to DEFAULT_CONTEXT_LIMIT. The previous value of 4096 was incorrect - that's a reasonable output token limit, but context windows for modern LLMs are 128K+. This caused OpenCode to display 4096 token context windows for models like kmc/kimi-k2.6. Changed DEFAULT_CONTEXT_LIMIT to 128000 to match the plugin's own default models (gpt-4o, gpt-4o-mini, llama-3.1-405b all use 128000). Fixes #19
…le cache fallback - Increase default timeout from 1000ms to 5000ms - Add bounded retry loop (max 3 attempts, backoff 250ms/500ms) - Add stale in-memory cache fallback when live refresh fails - Add structured failure classification (timeout, network, http_retryable, http_non_retryable, parse, invalid_structure) - Add improved logging for fetch attempts, failures, and fallback decisions - Keep all changes localized to src/models-dev.ts - Add 8 focused tests covering fresh cache, retries, stale fallback, fail-fast, and integration paths All 50 tests pass (0 regressions).
- Update package.json version from 1.2.0 to 1.4.1 - Add CHANGELOG.md entry for v1.4.1 - Add docs/release-notes-v1.4.1.md with release highlights and verification steps
- Cache isolation: key models.dev cache by URL (Map) to prevent cross-config data leakage when different configs specify different modelsDev.url values - Update outdated JSDoc comment for timeoutMs default (1000ms -> 5000ms) - Eliminate real setTimeout sleeps from tests by using cacheTtl: 0 for stale-cache scenarios instead of waiting for TTL expiry - Document worst-case cold-start latency (~15.75s) in fetchModelsDevData JSDoc - Update package-lock.json version to 1.4.1 (file is .gitignored but kept in sync locally) - Update CHANGELOG.md and release notes with code review fixes section All 50 tests pass (0 regressions).
…, getModelFamily🧑🧑🧒🧒 fix (#23) * docs: add model variant support fix design spec * feat(types,models): add variant grouping and xhigh support - Add variants field to OmniRouteModel interface - Add xhigh to reasoningEffort type - Implement groupVariantModels() pure function - Integrate grouping into fetchModels() pipeline between dedup and enrich * feat(plugin): use model.variants in toProviderModel and fix getModelFamily - toProviderModel() now prioritizes pre-populated model.variants over generated defaults - getModelFamily() strips provider prefix before extracting family name - Fixes incorrect family extraction for provider-prefixed versioned models * test(plugin): add variant grouping tests and fix cache isolation - Add cache clearing (clearModelCache, clearModelsDevCache) to afterEach - Add test: provider hook groups variant models under base model - Add test: provider hook creates synthetic base model when only variants are returned - Prevents cross-test contamination from mutable in-memory caches * docs: update CHANGELOG and release notes for model variant support fix - Add Model Variant Support Fix section to CHANGELOG.md (grouped under Added/Fixed) - Update docs/release-notes-v1.4.1.md with: - New highlight for variant grouping - Detailed Model Variant Support Fix section with edge cases table - getModelFamily() fix for provider-prefixed models - Updated test count (52 tests) - New design spec reference * refactor(models): remove redundant toLowerCase and drop docs/superpowers - Remove redundant suffix.toLowerCase() in groupVariantModels() — suffix is already lowercased when extracted from the model ID via slice() at line 184. Replaced with direct string literal comparison which also narrows the type for TypeScript. (gemini-code-assist review feedback) - Remove docs/superpowers/ directory from repository — design specs are development artifacts that don't need to be in the source tree. - Update release notes to remove design spec file references.
Comprehensive Release Message: v1.2.1This is the prepared release message for publishing Release Summary
It improves Highlights
Files And Artifacts
Verification EvidenceFresh checks before PR creation: Post-Merge Release Commandsgit checkout main
git pull origin main
git tag -a v1.2.1 -m "Release v1.2.1"
git push origin v1.2.1
gh release create v1.2.1 --title "v1.2.1" --notes-file docs/release-notes-v1.2.1.md
npm run prepublishOnly
npm publishIf npm requires MFA/2FA: npm publish --otp <CODE>Post-Release Verificationnpm view opencode-omniroute-auth version
gh release view v1.2.1 |
Code Review Roast 🔥Verdict: No Issues Found | Recommendation: Merge Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything. 📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are. Files Reviewed (6 files)
Reviewed by nemotron-3-super-120b-a12b-20230311:free · 642,900 tokens |
There was a problem hiding this comment.
Code Review
This pull request updates the plugin to version 1.2.1, introducing a resilient models.dev fetch pipeline with bounded retries and stale cache fallbacks, and a mechanism to group model variants under their base IDs. It also corrects the default context limit to 128,000 tokens and fixes model family extraction for provider-prefixed IDs. Feedback suggests that the variant grouping logic should be expanded to merge all capability flags, such as vision and tools, across variants into the base model to ensure accurate metadata.
Summary
Release
opencode-omniroute-authv1.2.1 as a patch release from the current published/package baseline1.2.0.This PR corrects the release identity to
1.2.1, includes the models.dev reliability work, the default context-limit fix, the model variant grouping fix, and keeps local planning artifacts out of the GitHub repository.Release Scope
1.2.0to1.2.1.CHANGELOG.mdentry for[1.2.1] - 2026-05-19.docs/release-notes-v1.2.1.md.models.devenrichment reliability with retry, backoff, structured failure classification, stale-cache fallback, and longer per-attempt timeout.DEFAULT_CONTEXT_LIMITfrom4096to128000.xhighsupport and synthetic base model creation.getModelFamily()for provider-prefixed model IDs such ascodex/gpt-5.5-xhigh..opencodetest config artifacts.docs/superpowers/from Git tracking while keeping those planning/spec artifacts local-only.Release Message
Highlights
models.devenrichment no longer drops enrichment on transient slowness or retryable HTTP failures.128000tokens.codex/gpt-5.5-highandcodex/gpt-5.5-xhighare grouped undercodex/gpt-5.5instead of appearing as duplicate top-level models.Compatibility
modelsDev.timeoutMsandmodelsDev.cacheTtlconfiguration continues to work.models.devis unavailable.Publish Notes
After this PR is merged to
main, the release process should use:Verification
Fresh local verification completed before opening this PR:
npm run prepublishOnlypassed with exit code0.npm testpassed with52tests,52passing,0failing, exit code0.npm pack --dry-runpassed with exit code0and produced dry-run package metadata foropencode-omniroute-auth@1.2.1.git push origin release/v1.2.1reportedEverything up-to-date.Risk Notes
models.devcold-start failure path can now spend up to roughly 15.75s across retries before failing open when no cache exists; this is intentional and documented as a reliability trade-off.docs/superpowers/content remains available locally but will no longer be part of the GitHub repository.