fix: allow partial provider model limits
Issue for this PR
Closes #31780
Type of change
- [x] Bug fix
- [ ] New feature
- [ ] Refactor / code improvement
- [ ] Documentation
What does this PR do?
Provider model limit config supports input, context, and output, but the schema required context and output together. That made valid partial overrides fail, such as setting only context for a model.
This PR makes each token limit field independent while preserving the same numeric validation. It also adds regression coverage for context-only, output-only, and input-only limit config.
The duplicate check found a related provider limit PR, but this PR is scoped to the existing schema behavior for partial model limits.
How did you verify your code works?
bun test test/config/config.test.ts
Screenshots / recordings
Not applicable. This is a config schema fix covered by a regression test.
Checklist
- [x] I have tested my changes locally
- [x] I have not included unrelated changes in this PR
The following comment was made by an LLM, it may be inaccurate:
Based on my search results, I found one potentially related PR:
- PR #29354:
feat(provider): support per-model limit overrides in user config- This PR appears to address similar functionality regarding per-model limits in user configuration, which is related to the current PR's focus on allowing partial provider model limits to be configured independently.
However, this is a related feature PR rather than a duplicate. The current PR (32320) is a bug fix that allows partial provider model limits, while PR #29354 is a feature addition for per-model limit overrides.
No duplicate PRs found
Thanks for updating your PR! It now meets our contributing guidelines. :+1: