Skip to content

Determine supported user byok providers from Vercel metadata instead of model prefix#556

Merged
chrarnoldus merged 10 commits intomainfrom
christiaan/user-byok
Feb 25, 2026
Merged

Determine supported user byok providers from Vercel metadata instead of model prefix#556
chrarnoldus merged 10 commits intomainfrom
christiaan/user-byok

Conversation

@chrarnoldus
Copy link
Contributor

No description provided.

@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Feb 25, 2026

Code Review Summary

Status: 1 New Issue Found | Recommendation: Address before merge

Overview

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

SUGGESTION

File Line Issue
src/lib/byok/index.ts 4 Duplicate drizzle-orm import — desc can be combined with the import on line 3
Other Observations (not in diff)
  • No tests: The new mapModelIdToVercel function and getModelUserByokProviders function have no unit tests. Consider adding tests for the model ID mapping logic (especially the kiloFreeModels lookup and inferVercelFirstPartyInferenceProviderForModel fallback) and the provider resolution logic (codestral special case vs. cached DB lookup).
  • Pre-existing typo in src/lib/providers/vercel/index.ts line 143: comment says "faill" instead of "fail".
Files Reviewed (6 files)
  • src/app/api/fim/completions/route.ts - 0 new issues
  • src/lib/byok/index.ts - 1 new issue
  • src/lib/providers/index.ts - 0 new issues
  • src/lib/providers/mistral.ts - 0 new issues
  • src/lib/providers/openrouter/inference-provider-id.ts - 0 new issues
  • src/lib/providers/vercel/index.ts - 0 new issues
  • src/lib/providers/vercel/mapModelIdToVercel.ts - 0 new issues

Fix these issues in Kilo Cloud

@chrarnoldus chrarnoldus changed the title Read user byok providers from Vercel metadata Determine supported user byok providers from Vercel metadata instead of model prefix Feb 25, 2026
import { readDb, type db } from '@/lib/drizzle';
import { byok_api_keys, modelsByProvider } from '@/db/schema';
import { eq, and, inArray } from 'drizzle-orm';
import { desc } from 'drizzle-orm';
Copy link
Contributor

Choose a reason for hiding this comment

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

SUGGESTION: Duplicate drizzle-orm import — desc can be combined with the import on line 3.

Suggested change
import { desc } from 'drizzle-orm';
import { eq, and, inArray, desc } from 'drizzle-orm';

@chrarnoldus chrarnoldus merged commit 62e00bc into main Feb 25, 2026
12 checks passed
@chrarnoldus chrarnoldus deleted the christiaan/user-byok branch February 25, 2026 13:32
kilo-code-bot bot added a commit that referenced this pull request Feb 25, 2026
Merge the separate 'desc' import into the existing drizzle-orm import
as suggested in PR #556 review comment.
chrarnoldus added a commit that referenced this pull request Feb 25, 2026
Addresses the review suggestion from PR #556
([comment](#556 (comment))):
combine the duplicate `drizzle-orm` import — `desc` is now merged into
the existing import on line 3.

---

Built for
[Christiaan](https://kilo-code.slack.com/archives/C08H16KGBUK/p1772026359129719)
by [Kilo for Slack](https://kilo.ai/features/slack-integration)
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.

3 participants