Skip to content

feat(providers): add BizRouter preset to the provider registry#385

Closed
latemonk wants to merge 1 commit into
lidge-jun:devfrom
latemonk:feat/bizrouter-preset
Closed

feat(providers): add BizRouter preset to the provider registry#385
latemonk wants to merge 1 commit into
lidge-jun:devfrom
latemonk:feat/bizrouter-preset

Conversation

@latemonk

@latemonk latemonk commented Jul 24, 2026

Copy link
Copy Markdown

Summary

Adds BizRouter (api.bizrouter.ai) — a Korean enterprise LLM gateway with an OpenAI-compatible surface — as a key-auth provider preset, modeled on the existing OrcaRouter entry. Model ids are vendor-namespaced (<vendor>/<model>, e.g. anthropic/claude-sonnet-5) and pass through to the upstream as-is.

Also adds bizrouter to EXPECTED_KEY_PROVIDER_IDS in the registry parity test.

Live verification (2026-07-24, api.bizrouter.ai)

  • POST /v1/chat/completions accepts the tools field and streams SSE.
  • GET /v1/models returns the per-API-key allowed catalog in the OpenAI list shape (object: "list", data[].id), so live model discovery narrows to exactly the models the key can use.
  • End-to-end through opencodex 2.7.35 registered as a custom openai-chat provider: a Codex /v1/responses request routed to bizrouter/anthropic/claude-haiku-4.5 returned the expected completion in both non-streaming and streaming modes, and the real Codex CLI (0.144.1) completed a turn through the proxy.

Testing

  • bun run typecheck clean
  • bun run test: 4022 pass / 0 fail (includes the updated provider-registry-parity suite)

Disclosure: I work with the BizRouter team.

Summary by CodeRabbit

  • New Features
    • Added BizRouter as an available AI provider.
    • Supports OpenAI-compatible chat, tool usage, API-key authentication, and model discovery.
    • Includes a default model and a selection of available models.

BizRouter (api.bizrouter.ai) is a Korean enterprise LLM gateway with an
OpenAI-compatible surface. Model ids are vendor-namespaced
(`<vendor>/<model>`) and pass through to the upstream as-is.

Live-verified 2026-07-24 against api.bizrouter.ai:
- POST /v1/chat/completions accepts the `tools` field and streams SSE
- GET /v1/models returns the per-API-key allowed catalog in the OpenAI
  list shape, so live model discovery narrows to what the key can use
- End-to-end through the proxy: Codex CLI `/v1/responses` request routed
  to `bizrouter/anthropic/claude-haiku-4.5` returned the expected
  completion (non-streaming and streaming)

Also adds "bizrouter" to EXPECTED_KEY_PROVIDER_IDS in the registry
parity test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions github-actions Bot added the enhancement New feature or request label Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds BizRouter as an OpenAI-compatible API-key provider with model metadata, then updates the provider parity test to expect its identifier.

Changes

BizRouter provider

Layer / File(s) Summary
Register BizRouter and validate provider ordering
src/providers/registry.ts, tests/provider-registry-parity.test.ts
Adds the BizRouter gateway configuration, default model, seeded models, and capability metadata; updates the expected key-provider ordering between OrcaRouter and Groq.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: ingwannu, lidge-jun

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding the BizRouter provider preset to the registry.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/provider-registry-parity.test.ts`:
- Line 32: Add a focused Bun regression test in the existing provider registry
tests for the "bizrouter" entry, asserting its adapter, URL, authentication
kind, default model, model allowlist, and live-discovery setting. Also verify
that its models endpoint uses the expected "/v1/models" behavior, while keeping
the existing parity-order test unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: faedc321-e6ac-4a37-bb57-cc9500aef400

📥 Commits

Reviewing files that changed from the base of the PR and between 9f953d8 and ac0260b.

📒 Files selected for processing (2)
  • src/providers/registry.ts
  • tests/provider-registry-parity.test.ts


const EXPECTED_KEY_PROVIDER_IDS = [
"anthropic-apikey", "openai-apikey", "umans", "opencode-go", "neuralwatt", "openrouter", "orcarouter", "groq", "google", "google-vertex", "azure-openai",
"anthropic-apikey", "openai-apikey", "umans", "opencode-go", "neuralwatt", "openrouter", "orcarouter", "bizrouter", "groq", "google", "google-vertex", "azure-openai",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Add a focused BizRouter registry regression test.

The parity list only checks that "bizrouter" exists in the expected order. It would still pass if the entry had an incorrect adapter, URL, auth kind, default model, model allowlist, or missing live-discovery flag. Add a focused Bun test asserting the complete BizRouter configuration and its /v1/models behavior contract.

As per path instructions, a behavior change in src/** must come with a focused regression test near the existing subsystem tests.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/provider-registry-parity.test.ts` at line 32, Add a focused Bun
regression test in the existing provider registry tests for the "bizrouter"
entry, asserting its adapter, URL, authentication kind, default model, model
allowlist, and live-discovery setting. Also verify that its models endpoint uses
the expected "/v1/models" behavior, while keeping the existing parity-order test
unchanged.

Source: Path instructions

@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: ac0260b7af

ℹ️ 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/providers/registry.ts
// streams, and GET /v1/models returns the per-API-key allowed catalog in the
// OpenAI list shape, so live model discovery narrows to what the key can use.
id: "bizrouter", label: "BizRouter", adapter: "openai-chat", baseUrl: "https://api.bizrouter.ai/v1",
authKind: "key", dashboardUrl: "https://bizrouter.ai/settings/keys",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Require security review for BizRouter key auth

This new preset participates in the API-key login path (authKind: "key" with a key dashboard), so it expands where opencodex collects, validates, stores, and forwards user credentials. Please make sure this change is explicitly routed through the repository's security review before merge, rather than treating it as a registry-only data addition.

AGENTS.md reference: AGENTS.md:L65-L69

Useful? React with 👍 / 👎.

Comment thread src/providers/registry.ts
// streams, and GET /v1/models returns the per-API-key allowed catalog in the
// OpenAI list shape, so live model discovery narrows to what the key can use.
id: "bizrouter", label: "BizRouter", adapter: "openai-chat", baseUrl: "https://api.bizrouter.ai/v1",
authKind: "key", dashboardUrl: "https://bizrouter.ai/settings/keys",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Require security review for BizRouter key auth

This new preset participates in the API-key login path (authKind: "key" with a key dashboard), so it expands where opencodex collects, validates, stores, and forwards user credentials. Please make sure this change is explicitly routed through the repository's security review before merge, rather than treating it as a registry-only data addition.

Useful? React with 👍 / 👎.

Comment thread src/providers/registry.ts
id: "bizrouter", label: "BizRouter", adapter: "openai-chat", baseUrl: "https://api.bizrouter.ai/v1",
authKind: "key", dashboardUrl: "https://bizrouter.ai/settings/keys",
defaultModel: "openai/gpt-5.6-sol",
models: ["openai/gpt-5.6-sol", "anthropic/claude-sonnet-5", "google/gemini-3.5-flash"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve context metadata for seeded BizRouter models

When BizRouter live discovery is unavailable or returns only model ids, these seeded rows have no modelContextWindows/modelMaxInputTokens, so the routed catalog falls back to the generic 128k context window in ensureStrictCatalogFields; that makes Codex compact/truncate far below the advertised capacity for models like openai/gpt-5.6-sol and anthropic/claude-sonnet-5. Please copy the known context metadata for the static fallback entries, as the OpenRouter preset does for the same namespaced models.

Useful? React with 👍 / 👎.


const EXPECTED_KEY_PROVIDER_IDS = [
"anthropic-apikey", "openai-apikey", "umans", "opencode-go", "neuralwatt", "openrouter", "orcarouter", "groq", "google", "google-vertex", "azure-openai",
"anthropic-apikey", "openai-apikey", "umans", "opencode-go", "neuralwatt", "openrouter", "orcarouter", "bizrouter", "groq", "google", "google-vertex", "azure-openai",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add focused BizRouter registry coverage

Adding only bizrouter to EXPECTED_KEY_PROVIDER_IDS verifies the catalog count/order but does not protect the new preset's behavior: a typo in the base URL, dashboard URL, default model, or slash-model routing seed would still pass this parity test. Please add a focused assertion near this registry suite that checks the BizRouter projection fields and at least one encoded routed slug/default model path.

Useful? React with 👍 / 👎.

@lidge-jun

Copy link
Copy Markdown
Owner

Thanks for the clean preset — registry row + parity test with live verification is exactly the shape we want for OpenAI-compatible providers.

Two things before merge:

  1. Please add BizRouter to the providers guide in docs-site/ (English source, and keep the translated locales consistent). Our policy is that user-facing provider additions ship with docs.
  2. Can you confirm your relationship to bizrouter.ai (vendor vs. community user)? Listing a provider means we endorse its endpoint to users, so we ask for a pointer to official public docs for api.bizrouter.ai if available.

No objection otherwise — once docs are in, this is good to go.

(Optional, unrelated to review: if BizRouter is interested in sponsoring the project for featured placement or a maintenance arrangement, happy to share details — sponsorship never affects merge decisions either way.)

@lidge-jun

Copy link
Copy Markdown
Owner

Reviewed — the endpoint and auth look correct (matches BizRouter's official docs), but four items before merge:

  1. Context metadata missing. The three seeded models have no modelContextWindows, so a /v1/models failure falls back to 128k tokens and compaction triggers at 115,200 — likely wrong for these models. Add modelContextWindows consistent with existing provider metadata.

  2. No focused contract test. provider-registry-parity.test.ts:32 only checks ID ordering. Per AGENTS.md, add assertions for adapter, URLs, auth, models, default model, and /v1/models derivation.

  3. Provider docs not updated. providers.md:113 still says 53 presets / 42 key providers and omits BizRouter. English + translated docs needed before merge.

  4. Governance. MAINTAINERS.md requires maintainer approval + required CI. The full build matrix hasn't run on this head (only CodeRabbit + enforce-target), and the vendor/community-relationship question from the owner is still open.

Data-only and low-risk otherwise — once the metadata + test + docs land and CI runs green, this should be straightforward.

@lidge-jun

Copy link
Copy Markdown
Owner

🔒 Maintainer integration in progress — please hold off on merging

@lidge-jun (maintainer) is actively integrating this PR into dev as part of a coordinated
integration pass. Please do not merge, rebase, force-push, or close this PR until this
marker is removed.

What is happening

This PR is being integrated on the maintainer branch codex/260725-pr-rework, which is
based on dev. The pass applies the contributed change, adds any missing regression
coverage, and repairs review-identified defects before a single verified merge into dev.
Every integrated change goes through bun run typecheck, the full bun run test suite,
bun run privacy:scan, and bun run lint:gui, followed by exact-SHA hosted
Cross-platform CI and Service lifecycle runs.

What this means for you

  • Your authorship and commits are preserved. Nothing is being rewritten under your name.
  • No action is needed from you right now. If a defect repair changes your intended
    behavior, it will be described explicitly in a follow-up comment before the merge.
  • If you have work in flight on this branch, please comment here instead of pushing, so we
    do not race each other.

This PR will be closed with a merge receipt (integration commit SHA, verification output,
and hosted CI links) once the pass lands on dev. Thanks for the contribution.

Integration tracker: devlog/_plan/260725_pr_issue_rework · marker posted by the maintainer integration pass

lidge-jun added a commit that referenced this pull request Jul 25, 2026
PR #427 (head a4a212d, author dev-shinyu)과 PR #385 (head ac0260b, author
latemonk)을 통합하고 단위 표기 결함과 테스트 공백을 함께 고친다.

#427은 previous_response_id 연속성 저장소의 count/bytes/age를
/api/system/memory에 얹어, RAM 증가가 대화 보존 때문인지 런타임 할당자
때문인지 구분할 수 있게 한다. 노출값은 숫자뿐이고 스냅샷은 lazy-load, prune,
evict를 하지 않는다.

단위 표기 수정: 카드가 1024로 나눈 값을 KB/MB로 표시해 단계마다 약 2.4%씩
어긋났다. 이제 KiB/MiB 표기를 쓰고 숫자도 활성 로케일을 따른다. RSS, JS heap,
JSC heap, 증가량, 저장소 total/largest, watchdog 임계값 7곳을 모두 바꿨다.

rendered 회귀 3건: 정상 payload가 이진 단위로 표시됨, unmount 후 폴링이
멈춤, non-OK 응답이 unavailable 노트로 degrade됨. formatter는 모듈 내부로
두었다 — export하면 react-refresh 규칙에 걸린다.

#385 BizRouter는 registry 목록 존재만 검사되고 있었다. 엔드포인트, adapter,
authKind, 기본 모델이 seed에 있음, vendor 네임스페이스 ID가 그대로
통과함(카탈로그 슬러그만 평탄화)을 고정하는 테스트를 추가했다.

Co-authored-by: dev-shinyu <dev-shinyu@users.noreply.github.com>
Co-authored-by: latemonk <latemonk@users.noreply.github.com>
@lidge-jun

Copy link
Copy Markdown
Owner

✅ Integrated into dev

Thank you for the contribution and for disclosing your relationship with BizRouter up front — that made this straightforward to review.

Integration commit: 15dfa270feat(observability): response-store metrics + BizRouter preset
Merged into dev at: ebc62d1f
Your authorship is preserved via Co-authored-by.

Review

The entry follows the existing registry shape exactly (id, label, adapter, baseUrl, authKind, dashboardUrl, defaultModel, models, note), the key rides the standard credential flow, and nothing in the diff overwrites user-configured provider fields. No logging concerns.

What was added on top

tests/provider-registry-parity.test.ts only asserted that the id appears in the expected list, which would still pass if the endpoint, adapter, or auth kind regressed. A focused test now pins the contract a user actually depends on: the endpoint the key is sent to, the adapter that parses the stream, that the default model is one of the seeded ids, and that vendor-namespaced ids such as openai/gpt-5.6-sol pass through unchanged — the catalog slug flattens the separator, but the routed model id does not, so the request still reaches BizRouter in the form it expects.

Verification

  • bun test tests/provider-registry-parity.test.ts: 27 pass / 0 fail
  • Full suite at merge: 4222 pass / 0 fail; typecheck, privacy scan, GUI lint clean
  • Cross-platform CI on ebc62d1f: green on ubuntu, macOS, Windows

@lidge-jun

Copy link
Copy Markdown
Owner

Closing: integrated into dev at ebc62d1f with authorship preserved. See the receipt comment above for the integration commit, the changes made on top, and the verification evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants