Conversation
| 'google-vertex', | ||
| 'inception', | ||
| 'moonshotai', | ||
| 'openrouter', |
There was a problem hiding this comment.
WARNING: 'openrouter' may not be a valid Vercel gateway provider id
Adding 'openrouter' to OpenRouterInferenceProviderIdSchema means it can flow into openRouterToVercelInferenceProviderId() and then into Vercel gateway routing (via convertProviderOptions()). That function currently falls back to returning the normalized string when there’s no explicit mapping; if 'openrouter' reaches Vercel, it’s likely not accepted by VercelInferenceProviderIdSchema / VercelUserByokInferenceProviderIdSchema, causing request failures when Vercel routing is used.
Consider explicitly mapping or filtering 'openrouter' so it never becomes a Vercel provider id.
| flags: ['reasoning'], | ||
| gateway: 'openrouter', | ||
| internal_id: 'openrouter/pony-alpha', | ||
| inference_providers: ['openrouter'], |
There was a problem hiding this comment.
WARNING: inference_providers: ['openrouter'] may break provider routing
applyProviderSpecificLogic() sets requestToMutate.provider.only from kiloFreeModel.inference_providers. If 'openrouter' isn’t an actual OpenRouter provider slug, requests for pony_alpha_free_model may be rejected by OpenRouter. Also, if the request is ever routed through Vercel, this provider id can be converted into an invalid Vercel gateway provider (see openRouterToVercelInferenceProviderId()).
If 'openrouter' is meant to indicate “no provider pinning”, consider omitting provider.only for this model instead of using a synthetic provider id.
Code Review SummaryStatus: 1 Issues Found | Recommendation: Address before merge Overview
Fix these issues in Kilo Cloud Issue Details (click to expand)SUGGESTION
Files Reviewed (4 files)
|
6f6fb43 to
84d213c
Compare
- Add openrouter-free-models.ts with pony_alpha_free_model definition - Add 'openrouter' to inference provider schema - Register in kiloFreeModels so isFreeModel() returns true - Update recommended-models.ts to use model reference - Update approval test snapshot
84d213c to
6b2a9bf
Compare
Co-authored-by: Christiaan Arnoldus <christiaan.arnoldus@outlook.com>
| gateway: 'openrouter', | ||
| internal_id: 'openrouter/pony-alpha', | ||
| inference_providers: ['stealth'], | ||
| } as KiloFreeModel; |
There was a problem hiding this comment.
SUGGESTION: Avoid type assertion (as KiloFreeModel) to preserve static checking
Using a type assertion here can hide missing/incorrect fields (e.g. gateway, inference_providers tuple shape) and makes refactors riskier. Prefer satisfies so TypeScript verifies the object while keeping the inferred literal types.
| } as KiloFreeModel; | |
| } satisfies KiloFreeModel; |
|
MERGE APPROVED |
Summary
pony_alpha_free_modeldefinition in newopenrouter-free-models.tsfile'openrouter'to inference provider schema (for OpenRouter-native models)kiloFreeModelssoisFreeModel()returns true and display name shows "Pony Alpha (free)"recommended-models.tsto use model reference instead of stringThis follows up on #53 which added Pony Alpha as a recommended model but didn't mark it as free.