Skip to content

[AISAGE-774] feat(byok): serve Kilo catalog model ids through direct BYOK keys in catalog mode - #8918

Open
chrarnoldus wants to merge 7 commits into
mainfrom
kilo/direct-byok-catalog-mode
Open

chrarnoldus wants to merge 7 commits into
mainfrom
kilo/direct-byok-catalog-mode

Conversation

@chrarnoldus

@chrarnoldus chrarnoldus commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Prep PRs already on main:

This PR builds on them.

Implements the plan in #8497. #8838 already merged the storage step (models.dev canonical_model_id → catalog_model_id on synced direct BYOK models). This PR adds catalog mode: a direct BYOK key that serves Kilo catalog model IDs such as moonshotai/kimi-k2.6, with organization model policies enforced, instead of bespoke IDs such as synthetic/hf:moonshotai/kimi-k2.6.

Data and storage

  • Uses the byok_api_keys.settings column (jsonb not null default '{}', typed by ByokApiKeySettingsSchema). The migration shipped separately in [AISAGE-774] feat(db): add byok_api_keys.settings jsonb column #8927, so this PR contains no migration. It holds the flag as settings.serve_catalog_models and leaves room for future per-key settings. Reads parse the column, and writes merge into it with ||, so other keys are preserved.

  • Catalog mode is off by default, for new and existing keys alike.

  • Catalog mode is only offered for a direct BYOK provider that has a models_dev_id and currently maps at least one model to a catalog ID. It is never offered for Vercel BYOK providers, or for providers such as morph-byok that map no model. The router refuses to turn it on anywhere else.

  • Primary selection (direct-byok/catalog-models.ts): when several upstream models of one provider map to one catalog ID, only one is served under it. The order is:

    1. the upstream ID that names the catalog model;
    2. then a recommended model;
    3. then the shortest ID.

    The map is derived from the cached model list and memoised per list.

  • A mapping only counts while its catalog ID is in the current OpenRouter snapshot (isValidOpenRouterModelId). This applies to routing, model-list badges and whether a provider offers catalog mode at all. Kilo-exclusive models are never served from a user's key.

Routing and policy (get-provider.ts, llm-proxy.ts)

  • Catalog ID: checkDirectBYOK finds the primary model of each provider that serves the ID, in DIRECT_BYOK_PROVIDERS order. It uses the first provider where the caller (user or organization) has an enabled catalog-mode key.
    • It returns bypassAccessCheck: false with userByok set. The organization model policy therefore applies to the catalog ID, and the zero-balance block is skipped, as for Vercel BYOK.
    • Without a catalog-mode key, the request keeps its existing route.
  • Bespoke ID on a catalog-mode key: returns the new direct-byok-catalog-only result, and the proxy fails fast with a 400 and error type direct_byok_catalog_only. The message names the catalog ID to use, or says the model has no catalog ID.
    • For an Organization Auto target, the same reason comes back as the Organization Auto configuration error.
  • Keys outside catalog mode behave exactly as before, including the policy exemption.

Model list and validation

  • Catalog models served by a catalog-mode key get hasUserByokAvailable: true, in both the personal and the organization list.
  • Bespoke entries of catalog-mode keys are no longer listed. /models/validate and custom-router entry validation reject them as a result, because both read the same list.

Key management (byok-router.ts, BYOKKeysManager.tsx)

  • list, create, update and setEnabled return three new fields: serve_catalog_models, supports_catalog_mode (the provider currently maps at least one model) and can_change_catalog_mode.
  • New setCatalogMode mutation:
    • Personal keys: the key owner can change it.
    • Organization keys: owners and admins only (ORGANIZATION_MANAGE_ROLES), in both directions. Changes are audit-logged.
    • Coding-plan-managed keys and unsupported providers are rejected.
  • New keys start with catalog mode off. Billing managers can create organization keys but cannot turn catalog mode on.
  • A key that is in catalog mode can always be turned off, even after its provider loses every catalog mapping.
  • UI: the switch "Use Kilo catalog model IDs (required for model policies)" appears only for keys whose provider offers catalog mode, and stays visible on a key that is still in catalog mode after its provider loses its mappings, so it can be turned off.
    • Both directions ask for confirmation first.
    • When the switch is off, a short prompt explains what turning it on does.
    • For billing managers the switch is read-only.
    • The key dialog explains catalog mode when updating a key that is in it.
  • MCP: services/kilo-mcp/catalog.json publishes byok.setCatalogMode. They apply the same role checks as in the app, the same as organizations.settings.updateAllowLists.

Stored references

  • Favorites and last-selected model: read with bespoke IDs of catalog-mode keys translated to catalog IDs. Unmapped ones are hidden, and nothing is rewritten.
    • removeFavorite also removes the stored originals that were read as that ID.
    • setFavorites keeps every stored original in place of its translation and keeps hidden ones, so turning catalog mode off restores them.
    • Both mutations take an optional organizationId. Mobile now sends it on removeFavorite.
  • Organization Auto targets: validateOrganizationAutoTarget first checks that the key's upstream supports the request's API. It then resolves a bespoke target of a catalog-mode key to its catalog ID and applies the model policy to that ID. Saving a route therefore stores the catalog ID, and stored bespoke targets keep resolving at request time. An unmapped target gets a specific error.
  • Custom router entries: an auto-routed bespoke model of a catalog-mode key is translated to its catalog ID before the policy check.

Changes from the plan

These address the open review remarks on #8497 or keep the change smaller:

  • Opt-in, settings column: catalog mode is opt-in for every key for now rather than on by default, and it lives in a JSON settings column rather than a boolean column. Because the default is off, the coding-plan insert path never sets it.
  • Only offered where it works: catalog mode is shown and accepted only for providers that map at least one model.
  • Organization Auto and custom routers: stored bespoke references are resolved when read or validated, instead of being rewritten when catalog mode is turned on. Turning it off restores them. No preview of unmapped references is shown before the switch; an unmapped reference fails at request time with a specific error.

Verification

  • Rebased on main after [AISAGE-774] feat(db): add byok_api_keys.settings jsonb column #8927, [AISAGE-774] refactor(byok): share BYOK key columns and response mapping in the router #8988 and [AISAGE-774] refactor(byok): look up BYOK keys through owner-scoped helpers #8989. packages/db is identical to main. Conflicts were resolved against the prep PRs, and checkDirectBYOK now uses main's name, resolveDirectByokProvider.
  • After the latest rebase:
    • pnpm test:db, then 202 affected Jest suites: 4792 passed. The one failure, in organizations.test.ts, passes when run alone and is unrelated.
    • web-shared, web and ai-gateway typecheck, oxlint, oxfmt --check and the MCP catalog check pass.
  • Regenerated the MCP catalog with pnpm script src/scripts/mcp-catalog/dump.ts; -- --check passes after the rebase.
  • Typecheck:
    • pnpm --filter @kilocode/web-shared typecheck, pnpm --filter web typecheck and pnpm --filter ai-gateway typecheck pass.
    • scripts/typecheck-all.sh --changes-only fails only in apps/mobile, on files this PR does not touch (missing local @kilocode/harness-sdk build).
  • Lint: oxlint --config .oxlintrc.json on apps/web/src, packages/web-shared/src, apps/ai-gateway/src and packages/db/src is clean. The mobile config on apps/mobile/src/lib/hooks is also clean.
  • pnpm exec oxfmt on changed files.
  • Jest via apps/web (DB-backed suites against the local test database), 80 suites, 1904 passed. Suites run: direct BYOK, BYOK, handlers, organizations, get-provider, auto-model, model-allow, byok-router, model-preferences-router, openrouter-models, auto-routing pool validation and routes, direct BYOK sync, organization routers, and balance-check eligibility.
  • New tests:
    • primary selection;
    • catalog-mode listing, badges, candidate lookup and reference translation;
    • checkDirectBYOK for rejected bespoke IDs with and without a mapping, catalog routing through the first catalog-mode key with access checks on, and fall-through;
    • llm-proxy responses for the catalog-only and Organization Auto errors, and auto-routed translation with a policy denial;
    • setCatalogMode permissions, audit log and defaults;
    • favorites translation, remove and replace;
    • Organization Auto target resolution;
    • BYOK availability.
  • ai-gateway integration suites and inventory-validation: 72 passed. Mobile use-model-preferences.test.ts: 6 passed.
  • After making catalog mode opt-in and moving it to settings: 184 affected suites pass (4366 tests). web-shared, web and ai-gateway typecheck and oxlint pass.
  • After the review fixes: model-preferences-router, organization-auto-model, BYOK UI and mcp-catalog suites, 125 passed. web-shared and web typecheck and oxlint pass.
  • Not done: no manual browser check or screenshots of the new BYOK switch.

Models used: anthropic/claude-opus-5.5 (Kilo), no subagent model overrides.

@chrarnoldus chrarnoldus self-assigned this Oct 26, 2026
Comment thread apps/web/src/components/organizations/byok/BYOKKeysManager.tsx Outdated
Comment thread apps/web/src/routers/model-preferences-router.ts Outdated
Comment thread packages/web-shared/src/lib/organizations/organization-auto-model.ts Outdated
Comment thread services/kilo-mcp/catalog.json
@kilo-code-bot

kilo-code-bot Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental change (1bb7f3a..3b6fe9c) routes offersCatalogMode and getCatalogModeModelIds through isLiveCatalogModelId; it reads correctly, keeps the Kilo-exclusive exclusion that helper already applies, and is covered by new tests for a retired mapping.

Assumptions: [INFERENCE] Review scope was the incremental diff only (3 files, 17 added lines). isValidOpenRouterModelId was read and is TTL-cached, so the added per-mapping awaits do not add query pressure. Test stubs in byok-router.test.ts and catalog-mode.test.ts were read, not executed; no test run or browser check was performed in this read-only review. The earlier byok.setCatalogMode MCP publication note remains accepted on the PR's stated rationale.

Files Reviewed (3 files)
  • apps/web/src/routers/byok-router.test.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/catalog-mode.test.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/index.ts
Previous Review Summaries (6 snapshots, latest commit 1bb7f3a)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 1bb7f3a)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

Catalog-mode routing, organization-policy enforcement, key-management authorization, and stored-reference translation look sound; the one new issue is a consistency gap where the availability/offer helpers skip the live-catalog check the routing helpers use, so /models can badge a model as BYOK-servable while the gateway serves it from Kilo credits.

Assumptions: [INFERENCE] The full diff from the PR base was reviewed because the previously reviewed commit (e1de0be0) is no longer in history. The retained byok.setCatalogMode MCP publication is accepted on the PR's stated rationale (app-equivalent owner/admin checks, audit logging, same authority as the already-published organizations.settings.updateAllowLists). No browser check of the new BYOK switch was performed, and no tests or typechecks were executed in this read-only review.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/web-shared/src/lib/ai-gateway/providers/direct-byok/index.ts 153 getCatalogModeModelIds and offersCatalogMode skip the isLiveCatalogModelId check used by the routing/resolution helpers
Files Reviewed (28 files)
  • apps/ai-gateway/src/app/api/v1/audience-auth.integration.test.ts
  • apps/ai-gateway/src/app/api/v1/model-validation.integration.test.ts
  • apps/mobile/src/lib/hooks/use-model-preferences.ts
  • apps/web/src/components/organizations/byok/BYOKKeysManager.tsx
  • apps/web/src/lib/byok/types.ts
  • apps/web/src/routers/byok-router.test.ts
  • apps/web/src/routers/byok-router.ts
  • apps/web/src/routers/model-preferences-router.test.ts
  • apps/web/src/routers/model-preferences-router.ts
  • packages/web-shared/src/lib/ai-gateway/byok/availability.test.ts
  • packages/web-shared/src/lib/ai-gateway/byok/index.ts
  • packages/web-shared/src/lib/ai-gateway/handlers/llm-proxy.test.ts
  • packages/web-shared/src/lib/ai-gateway/handlers/llm-proxy.ts
  • packages/web-shared/src/lib/ai-gateway/handlers/models.test.ts
  • packages/web-shared/src/lib/ai-gateway/handlers/models.ts
  • packages/web-shared/src/lib/ai-gateway/llm-proxy-helpers.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/catalog-mode.test.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/catalog-models.test.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/catalog-models.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/index.ts - 1 issue
  • packages/web-shared/src/lib/ai-gateway/providers/get-provider.local-fake.test.ts
  • packages/web-shared/src/lib/ai-gateway/providers/get-provider.ts
  • packages/web-shared/src/lib/organizations/organization-auto-model.test.ts
  • packages/web-shared/src/lib/organizations/organization-auto-model.ts
  • packages/web-shared/src/lib/organizations/organization-models.test.ts
  • packages/web-shared/src/lib/organizations/organization-models.ts
  • packages/web-shared/src/lib/proxy-error-types.ts
  • services/kilo-mcp/catalog.json

Fix these issues in Kilo Cloud

Previous review (commit e1de0be)

Status: No Issues Found | Recommendation: Merge

Executive Summary

This incremental pass re-checked the catalog-mode PR rebased onto main at 11072d09 (HEAD e1de0be0): all 30 PR files are byte-identical to the previously reviewed trees except llm-proxy.ts, llm-proxy-helpers.ts and services/kilo-mcp/catalog.json, whose only differences are the main commits pulled in by the rebase (requestStartedAt/ttfb measurement, transcription readResponseText, catalog refreshes), and no new issue was found on changed lines.

Assumptions: [INFERENCE] The retained byok.setCatalogMode MCP publication is accepted on the author's explanation (owner/admin checks, audit logging, same authority as the already-published organizations.settings.updateAllowLists; the PR body states this), and remains a human product decision. No manual browser check of the new BYOK switch was performed, and unchanged PR code was not re-audited beyond targeted verification of the three earlier review fixes (catalog-mode notice for the edited key, preservation of every translated favorite original, and the apiKind check before catalog-id resolution), all present at HEAD.

Files Reviewed (30 files)
  • apps/ai-gateway/src/app/api/v1/audience-auth.integration.test.ts
  • apps/ai-gateway/src/app/api/v1/model-validation.integration.test.ts
  • apps/mobile/src/lib/hooks/use-model-preferences.ts
  • apps/web/src/components/organizations/byok/BYOKKeysManager.tsx
  • apps/web/src/lib/byok/types.ts
  • apps/web/src/routers/byok-router.test.ts
  • apps/web/src/routers/byok-router.ts
  • apps/web/src/routers/model-preferences-router.test.ts
  • apps/web/src/routers/model-preferences-router.ts
  • apps/web/src/tests/openrouter-models.test.ts
  • packages/web-shared/src/lib/ai-gateway/byok/availability.test.ts
  • packages/web-shared/src/lib/ai-gateway/byok/index.ts
  • packages/web-shared/src/lib/ai-gateway/handlers/llm-proxy.test.ts
  • packages/web-shared/src/lib/ai-gateway/handlers/llm-proxy.ts
  • packages/web-shared/src/lib/ai-gateway/handlers/models.test.ts
  • packages/web-shared/src/lib/ai-gateway/handlers/models.ts
  • packages/web-shared/src/lib/ai-gateway/llm-proxy-helpers.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/catalog-mode.test.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/catalog-models.test.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/catalog-models.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/index.test.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/index.ts
  • packages/web-shared/src/lib/ai-gateway/providers/get-provider.local-fake.test.ts
  • packages/web-shared/src/lib/ai-gateway/providers/get-provider.ts
  • packages/web-shared/src/lib/organizations/organization-auto-model.test.ts
  • packages/web-shared/src/lib/organizations/organization-auto-model.ts
  • packages/web-shared/src/lib/organizations/organization-models.test.ts
  • packages/web-shared/src/lib/organizations/organization-models.ts
  • packages/web-shared/src/lib/proxy-error-types.ts
  • services/kilo-mcp/catalog.json

Previous review (commit 4dcb974)

Status: No Issues Found | Recommendation: Merge

Executive Summary

This incremental pass re-checked the catalog-mode PR at 4dcb9749: every PR file is byte-identical to the previously reviewed commit e3f25ab8 (verified with git diff over the full changed-file set), the three fix commits' changes are present at HEAD, and no new issues were found on changed lines.

Assumptions: [INFERENCE] The retained byok.setCatalogMode MCP publication is accepted on the author's explanation (same owner/admin authority as organizations.settings.updateAllowLists, with audit logging); it remains a human product decision. No manual browser check of the new BYOK switch was performed. No migrations are part of this PR (settings column shipped in #8927).

Files Reviewed (29 files)
  • apps/ai-gateway/src/app/api/v1/audience-auth.integration.test.ts
  • apps/ai-gateway/src/app/api/v1/model-validation.integration.test.ts
  • apps/mobile/src/lib/hooks/use-model-preferences.ts
  • apps/web/src/components/organizations/byok/BYOKKeysManager.tsx
  • apps/web/src/lib/byok/types.ts
  • apps/web/src/routers/byok-router.test.ts
  • apps/web/src/routers/byok-router.ts
  • apps/web/src/routers/model-preferences-router.test.ts
  • apps/web/src/routers/model-preferences-router.ts
  • apps/web/src/tests/openrouter-models.test.ts
  • packages/web-shared/src/lib/ai-gateway/byok/availability.test.ts
  • packages/web-shared/src/lib/ai-gateway/byok/index.ts
  • packages/web-shared/src/lib/ai-gateway/handlers/llm-proxy.test.ts
  • packages/web-shared/src/lib/ai-gateway/handlers/llm-proxy.ts
  • packages/web-shared/src/lib/ai-gateway/handlers/models.test.ts
  • packages/web-shared/src/lib/ai-gateway/handlers/models.ts
  • packages/web-shared/src/lib/ai-gateway/llm-proxy-helpers.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/catalog-mode.test.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/catalog-models.test.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/catalog-models.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/index.test.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/index.ts
  • packages/web-shared/src/lib/ai-gateway/providers/get-provider.local-fake.test.ts
  • packages/web-shared/src/lib/ai-gateway/providers/get-provider.ts
  • packages/web-shared/src/lib/organizations/organization-auto-model.test.ts
  • packages/web-shared/src/lib/organizations/organization-auto-model.ts
  • packages/web-shared/src/lib/organizations/organization-models.test.ts
  • packages/web-shared/src/lib/organizations/organization-models.ts
  • packages/web-shared/src/lib/proxy-error-types.ts
  • services/kilo-mcp/catalog.json

Previous review (commit e3f25ab)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental refactor (e3f25ab8) moves catalog mode from a boolean column to a default-off settings jsonb, gates it on the provider's current catalog mappings, and merges writes with ||; all previously raised findings are resolved at HEAD and I found no new issues on the changed lines.

Assumptions: [INFERENCE] The retained byok.setCatalogMode MCP publication is accepted on the author's explanation (same owner/admin authority as organizations.settings.updateAllowLists, with audit logging); it remains a human product decision. ALTER TABLE byok_api_keys ADD COLUMN settings jsonb DEFAULT '{}'::jsonb NOT NULL is a constant-default PG 11+ metadata-only add, so no rewrite/CONCURRENTLY concern. No manual browser check of the new BYOK switch was performed.

Files Reviewed (15 files)
  • apps/web/src/components/organizations/byok/BYOKKeysManager.tsx
  • apps/web/src/lib/byok/types.ts
  • apps/web/src/routers/byok-router.test.ts
  • apps/web/src/routers/byok-router.ts
  • apps/web/src/routers/model-preferences-router.test.ts
  • packages/db/src/migrations/0305_byok_api_key_settings.sql
  • packages/db/src/migrations/0305_byok_serve_catalog_models.sql (removed)
  • packages/db/src/migrations/meta/0305_snapshot.json
  • packages/db/src/migrations/meta/_journal.json
  • packages/db/src/schema-types.ts
  • packages/db/src/schema.ts
  • packages/web-shared/src/lib/ai-gateway/byok/index.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/catalog-mode.test.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/index.ts
  • services/kilo-mcp/catalog.json

Previous review (commit fd9cee4)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The three follow-up fixes — basing the key-dialog catalog notice on the edited key's mode, preserving every stored original of a translated favorite, and checking the key's API support before resolving an Organization Auto catalog target — are each correct at current HEAD, and the previously flagged MCP exposure was retained on purpose with the same owner/admin authority as the existing allow-list mutation.

Assumptions: [INFERENCE] The retained byok.setCatalogMode MCP publication is accepted on the author's explanation (same owner/admin authority as organizations.settings.updateAllowLists, with audit logging); it remains a human product decision. No manual browser check of the new dialog notice was performed.

Files Reviewed (5 files)
  • apps/web/src/components/organizations/byok/BYOKKeysManager.tsx
  • apps/web/src/routers/model-preferences-router.test.ts
  • apps/web/src/routers/model-preferences-router.ts
  • packages/web-shared/src/lib/organizations/organization-auto-model.test.ts
  • packages/web-shared/src/lib/organizations/organization-auto-model.ts

Previous review (commit 73f5426)

Status: 4 Issues Found | Recommendation: Address before merge

Executive Summary

Catalog mode is wired coherently through routing, organization policy, listings, and key management; the findings are a misleading catalog-mode notice in the shared add/edit key dialog, a new role-gated MCP write exposure for byok.setCatalogMode, and two narrower favorites and Organization Auto edge cases.

Assumptions: [INFERENCE] The MCP catalog is regenerated by CI and I did not find an explicit exclusion mechanism for individual procedures; no manual browser check of the new BYOK switch was performed. The migrations snapshot and journal were treated as generated and only checked for consistency with the additive ADD COLUMN ... DEFAULT false NOT NULL (metadata-only on modern PostgreSQL).

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 2
Issue Details (click to expand)

WARNING

File Line Issue
apps/web/src/components/organizations/byok/BYOKKeysManager.tsx 918 Catalog-mode banner is chosen from the provider default and also shows in edit mode, where byok.update never changes serve_catalog_models
services/kilo-mcp/catalog.json 3892 byok.setCatalogMode is newly published as an MCP mutation; it toggles whether organization model policies apply and the PR does not justify agent access

SUGGESTION

File Line Issue
apps/web/src/routers/model-preferences-router.ts 101 Only one stored original per translated catalog id survives setFavorites, so other bespoke favorites are dropped instead of restored later
packages/web-shared/src/lib/organizations/organization-auto-model.ts 174 Recursing with the catalog id skips the supportedChatApis check, so an unsupported apiKind route saves but fails at request time

Verified: catalog routing sets bypassAccessCheck: false with userByok set, so the organization policy check runs and the balance block is skipped; the zero-balance path is unchanged for bespoke ids; retired and Kilo-exclusive catalog ids are excluded from routing and listing; setCatalogMode enforces ownership plus ORGANIZATION_MANAGE_ROLES for organization keys and rejects coding-plan keys; the .sql migration adds a constant-default NOT NULL column without a table rewrite; the new WeakMap memo is keyed by the cached model-list arrays and does not leak. No .md documentation changed, so the image-format rule does not apply.

Files Reviewed (33 files)
  • apps/ai-gateway/src/app/api/v1/audience-auth.integration.test.ts
  • apps/ai-gateway/src/app/api/v1/model-validation.integration.test.ts
  • apps/mobile/src/lib/hooks/use-model-preferences.ts
  • apps/web/src/components/organizations/byok/BYOKKeysManager.tsx - 1 issue
  • apps/web/src/lib/byok/types.ts
  • apps/web/src/routers/byok-router.test.ts
  • apps/web/src/routers/byok-router.ts
  • apps/web/src/routers/model-preferences-router.test.ts
  • apps/web/src/routers/model-preferences-router.ts - 1 issue
  • apps/web/src/tests/openrouter-models.test.ts
  • packages/db/src/migrations/0305_byok_serve_catalog_models.sql
  • packages/db/src/migrations/meta/0305_snapshot.json
  • packages/db/src/migrations/meta/_journal.json
  • packages/db/src/schema.ts
  • packages/web-shared/src/lib/ai-gateway/byok/availability.test.ts
  • packages/web-shared/src/lib/ai-gateway/byok/index.ts
  • packages/web-shared/src/lib/ai-gateway/handlers/llm-proxy.test.ts
  • packages/web-shared/src/lib/ai-gateway/handlers/llm-proxy.ts
  • packages/web-shared/src/lib/ai-gateway/handlers/models.test.ts
  • packages/web-shared/src/lib/ai-gateway/handlers/models.ts
  • packages/web-shared/src/lib/ai-gateway/llm-proxy-helpers.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/catalog-mode.test.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/catalog-models.test.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/catalog-models.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/index.test.ts
  • packages/web-shared/src/lib/ai-gateway/providers/direct-byok/index.ts
  • packages/web-shared/src/lib/ai-gateway/providers/get-provider.local-fake.test.ts
  • packages/web-shared/src/lib/ai-gateway/providers/get-provider.ts
  • packages/web-shared/src/lib/organizations/organization-auto-model.test.ts
  • packages/web-shared/src/lib/organizations/organization-auto-model.ts - 1 issue
  • packages/web-shared/src/lib/organizations/organization-models.test.ts
  • packages/web-shared/src/lib/organizations/organization-models.ts
  • packages/web-shared/src/lib/proxy-error-types.ts
  • services/kilo-mcp/catalog.json - 1 issue

Fix these issues in Kilo Cloud


Reviewed by deepseek-flash-latest · Input: 40.5K · Output: 4.7K · Cached: 351.9K

Review guidance: REVIEW.md from base branch main

@chrarnoldus
chrarnoldus force-pushed the kilo/direct-byok-catalog-mode branch from e1de0be to 1bb7f3a Compare October 28, 2026 11:32
Comment thread packages/web-shared/src/lib/ai-gateway/providers/direct-byok/index.ts Outdated
# Conflicts:
#	packages/web-shared/src/lib/ai-gateway/handlers/llm-proxy.test.ts

This branch has not been deployed

No deployments
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