Skip to content

fix(opencode): use low reasoning effort for GitHub Copilot gpt-5 models#22824

Open
thakrarsagar wants to merge 1 commit intoanomalyco:devfrom
thakrarsagar:fix/copilot-gpt5-mini-reasoning-effort
Open

fix(opencode): use low reasoning effort for GitHub Copilot gpt-5 models#22824
thakrarsagar wants to merge 1 commit intoanomalyco:devfrom
thakrarsagar:fix/copilot-gpt5-mini-reasoning-effort

Conversation

@thakrarsagar
Copy link
Copy Markdown

@thakrarsagar thakrarsagar commented Apr 16, 2026

Issue for this PR

Closes #22806

Type of change

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

What does this PR do?

Session title generation uses the provider's "small model" (gpt-5-mini for github-copilot). The smallOptions() function in transform.ts sends reasoningEffort: "minimal" for GPT-5 models, but GitHub Copilot's API only accepts [low, medium, high] — not "minimal". This causes a 400 error that gets silently swallowed by Effect.ignore in the title generation fiber, so sessions stay stuck with the default "New session" title.

The fix adds a check in smallOptions(): if the model's adapter is @ai-sdk/github-copilot, use "low" instead of "minimal".

How did you verify your code works?

  • Reproduced the bug: confirmed title generation 400 errors against the live Copilot API with reasoningEffort: "minimal"
  • Applied the fix and confirmed title generation succeeds with "low"
  • bun typecheck passes in packages/opencode

Screenshots / recordings

N/A — not a UI change.

Checklist

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

GitHub Copilot API rejects reasoningEffort "minimal" for gpt-5-mini,
only accepting [low, medium, high]. This caused silent title generation
failures, leaving sessions stuck with default "New session - ..." names.
@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Apr 16, 2026
@github-actions
Copy link
Copy Markdown
Contributor

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

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.

Session titles no longer auto-update from conversation content after upgrading from 1.4.4 to 1.4.6

1 participant