Skip to content

fix(opencode): honor model limit.input overrides#16306

Open
ykswang wants to merge 1 commit intoanomalyco:devfrom
ykswang:fix/limit-input-override
Open

fix(opencode): honor model limit.input overrides#16306
ykswang wants to merge 1 commit intoanomalyco:devfrom
ykswang:fix/limit-input-override

Conversation

@ykswang
Copy link

@ykswang ykswang commented Mar 6, 2026

Issue for this PR

Closes #16298

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

provider.models.<model>.limit.input was not fully supported.

Two things were broken:

  • config validation rejected partial limit overrides like limit: { input: 123456 }
  • provider model merging dropped limit.input at runtime

This PR fixes both paths and adds regression tests for:

  • overriding limit.input on an existing model
  • preserving limit.input on a custom model

How did you verify your code works?

  • bun test test/provider/provider.test.ts --timeout 30000
  • bun test test/config/config.test.ts --timeout 30000
  • bun test test/session/compaction.test.ts --timeout 30000
  • bun run typecheck

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions bot added needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels Mar 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions bot removed needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels Mar 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

kiennq added a commit to kiennq/opencode that referenced this pull request Mar 6, 2026
timrichardson added a commit to timrichardson/opencode that referenced this pull request Mar 7, 2026
github-actions bot pushed a commit to kiennq/opencode that referenced this pull request Mar 7, 2026
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.

[FEATURE]: Allow overriding model input limits for OpenAI long-context models

1 participant