You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(models): add isFree field to model metadata (#1094)
## 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
- [x] `pnpm typecheck` — passes with no errors
- [x] 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.
0 commit comments