Skip to content

feat(core): add GPT delegation plugin with Ultra mode - #48412

Open
rekram1-node wants to merge 1 commit into
v2from
gpt-delegation
Open

feat(core): add GPT delegation plugin with Ultra mode#48412
rekram1-node wants to merge 1 commit into
v2from
gpt-delegation

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Issue for this PR

None.

Type of change

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

What does this PR do?

Add opencode.gpt-delegation, implemented through catalog transforms and Session hooks. Ultra copies the existing max variant for Sol/Terra or xhigh for Astra, including provider settings, headers, and body overrides.

Move delegation policy out of the static GPT prompts. Normal GPT mode requires an explicit delegation request; Ultra enables proactive delegation. Switching away from GPT retires the policy. Reminders persist as synthetics and render as chronological system messages, with per-request checks to restore missing reminders and supersede stale ones.

How did you verify your code works?

From packages/core:

  • RECORD=false CI=1 bun test test/plugin/gpt-delegation.test.ts test/plugin/optimize.test.ts test/plugin/plan.test.ts test/session-runner-recorded.test.ts
  • bun test test/session-runner.test.ts -t "selected model family prompt"
  • bun typecheck

All 28 focused tests passed, including model transitions, missing-reminder recovery, and system-role rendering. Formatting and diff checks passed. The cassette request was updated locally and replayed.

Screenshots / recordings

Not applicable.

Checklist

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

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.

1 participant