Skip to content

fix(opencode): respect configured model input limits#18070

Closed
danielwolfman wants to merge 1 commit intoanomalyco:devfrom
danielwolfman:fix/openai-input-limit-override
Closed

fix(opencode): respect configured model input limits#18070
danielwolfman wants to merge 1 commit intoanomalyco:devfrom
danielwolfman:fix/openai-input-limit-override

Conversation

@danielwolfman
Copy link
Copy Markdown

Issue for this PR

Closes #16298
Refs #16308

Type of change

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

What does this PR do?

It keeps provider.models.<model>.limit.input when building provider config overrides and allows config files to override just limit.input without restating context and output.

That fixes the long-context OpenAI case where users want to raise the client-side compaction threshold for models like gpt-5.4.

How did you verify your code works?

  • Added provider tests that verify custom models keep configured limit.input
  • Added a regression test that verifies an openai model override can set only limit.input
  • Ran bun test test/provider/provider.test.ts
  • Ran bun typecheck in packages/opencode

Screenshots / recordings

N/A

Checklist

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

@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Found a related PR:

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

This PR appears to address the same issue - honoring/respecting model limit.input configuration overrides. It's likely a closely related or duplicate attempt at fixing the same problem described in the current PR #18070.

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