Skip to content

port(omniroute): #6681 - fix(providers): register openrouter rerank provider - #139

Merged
bloodf merged 3 commits into
devfrom
port/omniroute-6681
Jul 14, 2026
Merged

bloodf merged 3 commits into
devfrom
port/omniroute-6681

Conversation

@bloodf

@bloodf bloodf commented Jul 9, 2026 •

Copy link
Copy Markdown
Owner

UPDATE (2026-07-14, maintainer decision): Any "blocked on Quota-Tracker" gate is overridden for this release — openrouter rerank support ships ahead of the quota batch. Both Codex review threads are fixed and resolved; local gates pass under the pinned Node 20.20.2; rebased on current dev.


⛔ BLOCKED on Quota-Tracker Port (overridden — see update above)

This PR is intentionally not merge-ready until the port/omniroute-quota-batch tracker lands (~291 files across 7 sub-batches, scoped in .omc/wt-coordinator/plans/quota-port-survey.md).

Per maintainer decision: provider-only ports without the OmniRoute quota tracker family (codexUsageQuotas, quotaShareStrategy, deviceTracker, geminiRateLimitTracker, providerCooldownTracker, etc.) are incomplete.


Scope

Port OmniRoute PR #6681 to DurinDoor. Registers the OpenRouter rerank provider so clients can route Cohere-compatible POST /api/v1/rerank requests through openrouter/cohere/rerank-4-pro (and rerank-4-fast, rerank-v3.5). Updates the openrouter registry serviceKinds to include "rerank". The 3-segment model id parses safely via parseModel (split on first slash).

Files

  • open-sse/providers/registry/openrouter.js — added 3 rerank model entries; appended "rerank" to serviceKinds
  • tests/unit/rerank-openrouter-6574.test.js — new focused unit test

Test coverage

  • Targeted unit test (new): 4/4 PASS — verifies parseModel("openrouter/cohere/rerank-4-pro") resolves, openrouter serviceKinds contains "rerank", PROVIDER_MODELS.openrouter contains the rerank ids, and deriveRerankUrl routes the resolved model to https://openrouter.ai/api/v1/rerank.

Doc coverage

  • Inline JSDoc comment in open-sse/providers/registry/openrouter.js explaining the Cohere-compatible rerank endpoint, model-id format, and the catalog hand-seed.
  • Inline comment in the test file pointing to OmniRoute #6574 / PR #6681 for the source.

Baseline impact

  • tests/__baseline__/known-fails.txt: NOT modified.
  • test:ci: currently RED on origin/dev itself with 36 pre-existing pass→fail regressions (same set as the broader baseline drift). None of these are caused by this port.
  • npm run lint: 0 new errors. PASS for this port.

Wire-format / migration

  • No new env vars. No API key shape changes. Rerank model IDs use the existing OpenRouter provider/model slash convention.

Out of scope

  • Skipped per investigator plan: CHANGELOG.md (release-infra branch) and tests/unit/rerank-openrouter-6574.test.ts (no TS in DurinDoor; wrote JS test instead).

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c5ccff9a61

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread open-sse/providers/registry/openrouter.js
Comment thread open-sse/providers/registry/openrouter.js
Comment thread open-sse/providers/registry/openrouter.js

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c9a3e1857b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/app/api/v1/models/[kind]/route.js
Comment thread open-sse/providers/registry/openrouter.js
@bloodf

bloodf commented Jul 9, 2026

Copy link
Copy Markdown
Owner Author

Maintainer note: This PR is not yet ready to merge. It is intentionally blocked on the broader Quota-Tracker port (per the maintainer decision to import all OmniRoute quota trackers before treating provider-only ports as complete).

Linked dependency: see .omc/wt-coordinator/plans/quota-port-survey.md for the full sub-batch classification (~291 files, 7 sub-batches).

Why:

  1. Quota-tracker gap: OmniRoute's codexUsageQuotas / quotaShareStrategy / deviceTracker / geminiRateLimitTracker family is not yet in origin/dev. The new rerank kind mapping works on the OpenRouter side; the matching rerank-quota accounting (quotaShareConcurrency, quotaShareStrategy) is part of the broader quota port.
  2. All 3 Codex threads addressed in commit c9a3e1857 and resolved: rerank kind mapping in buildModelsList, NVIDIA free reranker seed entry, ping-by-rerank.

@bloodf bloodf added the blocked-on-quota Blocked on quota-tracker port (~291 files, 7 sub-batches) label Jul 9, 2026
@bloodf

bloodf commented Jul 13, 2026

Copy link
Copy Markdown
Owner Author

Fix-up branch ready: fix/audit-omniroute-139

Root cause: the 33 CI 'regressions' were false positives — the branch predates dev commits that drained the known-fails baseline (#151) and fixed flaky tests. PR's own rerank source is complete and correct (registry rerank service kind, buildModelsList mapping, ping-by-kind → /api/v1/rerank, deriveRerankUrl; rerankCore is the generic passthrough so no separate executor needed).

Fix: merged origin/dev into the fix branch to pull in the drained baseline + dev test fixes. PR diff vs dev unchanged (7 files, +216/-2); no source edits needed.

Verification: PR's own 7 rerank tests pass; ESLint 0 errors (1 pre-existing warning); commitlint clean. Remaining flakies reproduce on plain origin/dev.

Authoring: model MiniMax-M3, harness Oh My Pi.

@bloodf
bloodf force-pushed the port/omniroute-6681 branch from a334565 to 889a6f2 Compare July 13, 2026 03:10
durindoor-port-agent and others added 3 commits July 14, 2026 18:30
Resolve the 2 Codex threads on #139:
- add rerank -> /v1/rerank to KIND_ENDPOINT so GET /v1/models/info returns a
  non-null endpoint for openrouter/cohere/rerank-* models;
- add rerank to MEDIA_PROVIDER_KINDS so /dashboard/media-providers/rerank no
  longer 404s.
@bloodf
bloodf force-pushed the port/omniroute-6681 branch from 889a6f2 to e426c41 Compare July 14, 2026 18:35
@bloodf
bloodf merged commit 3a9b36d into dev Jul 14, 2026
3 checks passed
@bloodf
bloodf deleted the port/omniroute-6681 branch July 17, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-on-quota Blocked on quota-tracker port (~291 files, 7 sub-batches)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant