feat(providers): add BizRouter preset to the provider registry#385
feat(providers): add BizRouter preset to the provider registry#385latemonk wants to merge 1 commit into
Conversation
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>
📝 WalkthroughWalkthroughAdds BizRouter as an OpenAI-compatible API-key provider with model metadata, then updates the provider parity test to expect its identifier. ChangesBizRouter provider
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
src/providers/registry.tstests/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", |
There was a problem hiding this comment.
🎯 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
There was a problem hiding this comment.
💡 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".
| // 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", |
There was a problem hiding this comment.
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 👍 / 👎.
| // 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", |
There was a problem hiding this comment.
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 👍 / 👎.
| 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"], |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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 👍 / 👎.
|
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:
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.) |
|
Reviewed — the endpoint and auth look correct (matches BizRouter's official docs), but four items before merge:
Data-only and low-risk otherwise — once the metadata + test + docs land and CI runs green, this should be straightforward. |
🔒 Maintainer integration in progress — please hold off on merging@lidge-jun (maintainer) is actively integrating this PR into What is happening This PR is being integrated on the maintainer branch What this means for you
This PR will be closed with a merge receipt (integration commit SHA, verification output, Integration tracker: |
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>
✅ Integrated into
|
|
Closing: integrated into |
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
bizroutertoEXPECTED_KEY_PROVIDER_IDSin the registry parity test.Live verification (2026-07-24, api.bizrouter.ai)
POST /v1/chat/completionsaccepts thetoolsfield and streams SSE.GET /v1/modelsreturns 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.openai-chatprovider: a Codex/v1/responsesrequest routed tobizrouter/anthropic/claude-haiku-4.5returned 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 typecheckcleanbun run test: 4022 pass / 0 fail (includes the updatedprovider-registry-paritysuite)Disclosure: I work with the BizRouter team.
Summary by CodeRabbit