Skip to content

Remove 1m-context fork feature #170

@randomm

Description

@randomm

Task Description

Remove the 1m-context fork feature entirely. It causes errors on startup and is no longer needed.

Changes Required

Revert fork modifications in 4 files:

  1. packages/opencode/src/provider/provider.ts — Remove context-1m-2025-08-07 from anthropic-beta header; delete context limit override block (lines ~650-654)
  2. packages/opencode/src/plugin/copilot.ts — Revert anthropic-beta header to upstream's interleaved-thinking-2025-05-14 only
  3. packages/opencode/src/session/compaction.ts — Add back + input.tokens.output to overflow calculation
  4. packages/opencode/src/provider/transform.ts — Revert Opus 4.6 effort-based variants to upstream's simple budgetTokens pattern

Update fork governance:
5. .fork-features/manifest.json — Set 1m-context status to "dropped"
6. .fork-features/verify.ts — No changes needed (verifier already skips non-active features)

Quality Gates (Non-Negotiable)

  • Typecheck: bun run typecheck passes
  • Tests: bun test passes (no regressions)
  • Feature verification: bun test .fork-features/verify.ts passes
  • No fork feature damage: async-tasks and rg-tool remain intact

Acceptance Criteria

  • No references to context-1m-2025-08-07 remain in source code
  • No context limit override to 1,000,000 remains
  • Compaction overflow includes output tokens (upstream behavior)
  • Manifest shows 1m-context as "dropped"
  • Binary starts without 1M context errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions