Skip to content

Refactor AI gateway provider definitions - #6076

Open
chrarnoldus wants to merge 2 commits into
mainfrom
refactor/provider-definitions-folder
Open

Refactor AI gateway provider definitions#6076
chrarnoldus wants to merge 2 commits into
mainfrom
refactor/provider-definitions-folder

Conversation

@chrarnoldus

Copy link
Copy Markdown
Contributor

Summary

  • move each static AI gateway provider definition into providers/definitions
  • update consumers to import provider definitions directly without re-exports
  • isolate provider lookup in try-get-provider-by-id.ts

Testing

  • Not run locally; CI will handle validation as requested.
  • git diff --check

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@chrarnoldus chrarnoldus self-assigned this Sep 11, 2026
@kilo-code-bot

kilo-code-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental commit updates the previously stale provider-definitions.ts references in ENVIRONMENT.md to the exact providers/definitions/openrouter.ts, longcat.ts, and streamlake.ts modules; all three paths exist and no new issues were introduced.

Files Reviewed (1 file)
  • ENVIRONMENT.md - previous stale-path finding resolved; paths verified against providers/definitions/
Previous Review Summary (commit 3ad95fc)

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

Previous review (commit 3ad95fc)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

No runtime or logic defects found in the refactor; provider definitions were moved byte-for-byte into providers/definitions/, but ENVIRONMENT.md still points readers at the deleted provider-definitions.ts module.

Overview

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

SUGGESTION

File Line Issue
ENVIRONMENT.md 267, 270, 271 References to the deleted apps/web/src/lib/ai-gateway/providers/provider-definitions.ts are now stale. Update them to the new modules, e.g. providers/definitions/openrouter.ts, providers/definitions/longcat.ts, and providers/definitions/streamlake.ts. This file is unchanged by the PR, so it is reported summary-only (no valid diff line to anchor).
Files Reviewed (26 files)
  • apps/web/src/lib/ai-gateway/auto-model/resolution.ts
  • apps/web/src/lib/ai-gateway/local-fake-llm.ts
  • apps/web/src/lib/ai-gateway/model-api-kinds.ts
  • apps/web/src/lib/ai-gateway/processUsage.ts
  • apps/web/src/lib/ai-gateway/providerHash.test.ts
  • apps/web/src/lib/ai-gateway/providerHash.ts
  • apps/web/src/lib/ai-gateway/providers/definitions/alibaba.ts
  • apps/web/src/lib/ai-gateway/providers/definitions/longcat.ts
  • apps/web/src/lib/ai-gateway/providers/definitions/martian.ts
  • apps/web/src/lib/ai-gateway/providers/definitions/mistral.ts
  • apps/web/src/lib/ai-gateway/providers/definitions/openrouter.ts
  • apps/web/src/lib/ai-gateway/providers/definitions/seed.ts
  • apps/web/src/lib/ai-gateway/providers/definitions/streamlake.ts
  • apps/web/src/lib/ai-gateway/providers/definitions/try-get-provider-by-id.ts
  • apps/web/src/lib/ai-gateway/providers/definitions/vercel.ts
  • apps/web/src/lib/ai-gateway/providers/get-provider.local-fake.test.ts
  • apps/web/src/lib/ai-gateway/providers/get-provider.ts
  • apps/web/src/lib/ai-gateway/providers/getEmbeddingProvider.test.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/index.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/sync-providers.ts
  • apps/web/src/lib/ai-gateway/providers/provider-definitions.test.ts
  • apps/web/src/lib/ai-gateway/providers/provider-definitions.ts (deleted)
  • apps/web/src/lib/coding-plans/inventory-validation.ts
  • apps/web/src/routers/byok-router.ts
  • apps/web/src/scripts/byok/test.ts
  • apps/web/src/tests/openrouterApi.timeout.test.ts

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>

Copy link
Copy Markdown
Contributor Author

Updated all stale provider-definition paths in ENVIRONMENT.md to their exact leaf modules in 4b8b18c.

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.

2 participants