Skip to content

feat(models): add isFree field to model metadata#1094

Open
kilo-code-bot[bot] wants to merge 2 commits intomainfrom
feat/add-is-free-to-model-metadata
Open

feat(models): add isFree field to model metadata#1094
kilo-code-bot[bot] wants to merge 2 commits intomainfrom
feat/add-is-free-to-model-metadata

Conversation

@kilo-code-bot
Copy link
Contributor

@kilo-code-bot kilo-code-bot bot commented Mar 13, 2026

Summary

Add an isFree boolean field to the OpenRouter model metadata, computed using the existing isFreeModel() function. This makes each model's free status directly available in the API response rather than requiring clients to re-derive it. The field is placed next to preferredIndex in both the Zod schema and the enhancedModelList builder.

Verification

  • pnpm typecheck — passes with no errors
  • Manual review of isFree values in approval files against isFreeModel() logic

Visual Changes

N/A

Reviewer Notes

  • The isFree field is set via isFreeModel(model.id) in enhancedModelList(), so every model returned by the enhanced endpoint will have this field.
  • The Zod schema marks isFree as optional since raw OpenRouter models won't have it — only enhanced models will.
  • Both approval JSON files updated with expected isFree values matching the current isFreeModel logic.

@kilo-code-bot
Copy link
Contributor Author

kilo-code-bot bot commented Mar 13, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (6 files)
  • src/lib/kilo-auto-model.ts
  • src/lib/models.ts
  • src/lib/organizations/organization-types.ts
  • src/lib/providers/openrouter/index.ts
  • src/tests/openrouter-models-sorting.approved.json
  • src/tests/openrouter-models.test.approved.json

Reviewed by gpt-5.4-20260305 · 309,257 tokens

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