Skip to content

Release v1.2.1#24

Open
Alph4d0g wants to merge 10 commits into
mainfrom
release/v1.2.1
Open

Release v1.2.1#24
Alph4d0g wants to merge 10 commits into
mainfrom
release/v1.2.1

Conversation

@Alph4d0g
Copy link
Copy Markdown
Owner

Summary

Release opencode-omniroute-auth v1.2.1 as a patch release from the current published/package baseline 1.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

  • Bump package metadata from 1.2.0 to 1.2.1.
  • Add CHANGELOG.md entry for [1.2.1] - 2026-05-19.
  • Add prepared GitHub release notes at docs/release-notes-v1.2.1.md.
  • Improve models.dev enrichment reliability with retry, backoff, structured failure classification, stale-cache fallback, and longer per-attempt timeout.
  • Correct DEFAULT_CONTEXT_LIMIT from 4096 to 128000.
  • Group reasoning-effort variant models under their base model ID, including xhigh support and synthetic base model creation.
  • Fix getModelFamily() for provider-prefixed model IDs such as codex/gpt-5.5-xhigh.
  • Add regression coverage for retry/fallback behavior, variant grouping, and synthetic base creation.
  • Remove accidentally committed .opencode test config artifacts.
  • Exclude docs/superpowers/ from Git tracking while keeping those planning/spec artifacts local-only.

Release Message

Highlights

  • models.dev enrichment no longer drops enrichment on transient slowness or retryable HTTP failures.
  • Stale enrichment cache fallback keeps provider metadata available when live refresh fails after a previous successful fetch.
  • OmniRoute default context limit now matches the API default of 128000 tokens.
  • Variant-suffixed reasoning models such as codex/gpt-5.5-high and codex/gpt-5.5-xhigh are grouped under codex/gpt-5.5 instead of appearing as duplicate top-level models.
  • Internal superpowers planning/spec artifacts are now local-only and ignored by Git.

Compatibility

  • No breaking changes expected.
  • Existing modelsDev.timeoutMs and modelsDev.cacheTtl configuration continues to work.
  • Plugin behavior remains fail-open when models.dev is unavailable.

Publish Notes

After this PR is merged to main, the release process should use:

git 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 publish

Verification

Fresh local verification completed before opening this PR:

  • npm run prepublishOnly passed with exit code 0.
  • npm test passed with 52 tests, 52 passing, 0 failing, exit code 0.
  • npm pack --dry-run passed with exit code 0 and produced dry-run package metadata for opencode-omniroute-auth@1.2.1.
  • git push origin release/v1.2.1 reported Everything up-to-date.

Risk Notes

  • models.dev cold-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.

Alph4d0g added 9 commits May 17, 2026 17:31
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.
@Alph4d0g
Copy link
Copy Markdown
Owner Author

Comprehensive Release Message: v1.2.1

This is the prepared release message for publishing opencode-omniroute-auth@1.2.1 after this PR is merged.

Release Summary

v1.2.1 is a patch release over v1.2.0 focused on reliability, correctness, and release hygiene.

It improves models.dev enrichment resilience, fixes OmniRoute's default context limit, groups reasoning-effort model variants correctly, and ensures local superpowers planning artifacts are not tracked in GitHub.

Highlights

  • models.dev reliability pipeline: live enrichment fetch now retries retryable failures with bounded exponential backoff and structured failure classification.
  • Stale cache fallback: when a live enrichment refresh fails and stale cache data exists, the plugin uses stale cache instead of losing enrichment entirely.
  • Safe fail-open behavior: when no cache exists and all enrichment attempts fail, the plugin returns null for enrichment data and continues normal operation.
  • Default context limit fix: DEFAULT_CONTEXT_LIMIT is corrected from 4096 to 128000 to match OmniRoute API behavior.
  • Model variant grouping: variant-suffixed models such as codex/gpt-5.5-high and codex/gpt-5.5-xhigh are grouped under codex/gpt-5.5.
  • xhigh support: model variants now support reasoningEffort: 'xhigh'.
  • Synthetic base models: if OmniRoute returns variants without a base model, the plugin creates a synthetic base and attaches variants to it.
  • Provider-prefixed family fix: getModelFamily('codex/gpt-5.5-xhigh') now resolves to gpt instead of codex/gpt.
  • Test isolation: model caches are cleared between relevant tests to avoid cross-test contamination.
  • Repo hygiene: .opencode test config artifacts were removed, and docs/superpowers/ is ignored so local planning/spec files stay local.

Files And Artifacts

  • Package version: 1.2.1
  • Changelog entry: CHANGELOG.md section ## [1.2.1] - 2026-05-19
  • GitHub release notes: docs/release-notes-v1.2.1.md
  • Branch: release/v1.2.1

Verification Evidence

Fresh checks before PR creation:

npm run prepublishOnly
EXIT_CODE=0
npm test
52 tests
52 pass
0 fail
EXIT_CODE=0
npm pack --dry-run
package: opencode-omniroute-auth@1.2.1
total files: 39
EXIT_CODE=0

Post-Merge Release Commands

git 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 publish

If npm requires MFA/2FA:

npm publish --otp <CODE>

Post-Release Verification

npm view opencode-omniroute-auth version
gh release view v1.2.1

Comment thread src/models-dev.ts Outdated
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented May 19, 2026

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)
  • CHANGELOG.md
  • docs/release-notes-v1.2.1.md
  • src/models-dev.ts
  • src/models.ts
  • test/models-dev.test.mjs
  • test/models.test.mjs

Reviewed by nemotron-3-super-120b-a12b-20230311:free · 642,900 tokens

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/models.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant