Skip to content

fix(runtime): OpenCode Free requests omit session identity (MissingSessionID) #4960

Closed

Description

@me2seeks

What happened

Requests through Maka's built-in opencode-free provider can fail with:

Error from provider (Console): OpenCode's free tier can only be used in OpenCode
(code=MissingSessionID, status=400)

The shared withOpenCodeSessionHeader helper currently adds x-opencode-session only for opencode-go. Connection Test also generates its operation identity only for Go. Free therefore omits the identity even when normal execution has a Maka Session ID.

Expected: Free inference carries the existing stable conversation identity, and sessionless Connection Test uses a stable identity for that operation, preserving explicit header overrides.

How to reproduce

  1. Select the built-in OpenCode Free provider and send a message to a free model.
  2. The reporter observed the HTTP 400 error above. The exact model and running build were not captured.
  3. Independently inspect packages/runtime/src/opencode-session-header.ts and test-connection.ts: both restrict session-header handling to opencode-go. A request-capture regression can demonstrate the omission without contacting the provider.

Environment

  • Source inspected: apache/maka main b06eb02e6a.
  • Affected layer: shared Runtime provider requests used by Desktop and TUI.
  • Reporter running version / exact model: not captured.

Logs, screenshots, or additional context

#4670 already added the Go session-identity plumbing but explicitly excluded Free. Upstream's vercel/ai#20271 announces a September 5 requirement for Go; it does not establish the precise rollout date for Free.

Scope: extend the existing identity handling to Free and cover normal requests, explicit overrides, and Connection Test. Keep the intentional models.dev snapshot-derived Free inventory unchanged. This is separate from #3449's quarantined-model display/probe cleanup and introduces no model failover.

Created with OpenAI Codex assistance on behalf of @me2seeks; implementation will be handled by @me2seeks.

Activity

  1. added
    bug
    on Sep 7, 2026
  2. me2seeks commented on Sep 7, 2026

    @me2seeks
    ContributorAuthor

    take

  3. added a commit that references this issue on Sep 7, 2026
    e970405
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions