Skip to content

Fixed endpoint, messages format, response parsing. - #33

Merged
star4droid merged 5 commits into
masterfrom
opencode/dispatch-a7221c-20260619042250
Jun 19, 2026
Merged

Fixed endpoint, messages format, response parsing.#33
star4droid merged 5 commits into
masterfrom
opencode/dispatch-a7221c-20260619042250

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

All fixes are applied. Here's a summary of the changes in EditorAI.java:

  1. Endpoint URL (line 45): Changed from /zen/v1/responses to /zen/v1/chat/completions — the correct endpoint for OpenAI-compatible models

  2. JSON body format (line 349-362): Changed from {"model":"...","input":"..."} to {"model":"...","messages":[...]} — the standard OpenAI chat completions format with a messages array containing:

    • A system message with the Star2D context/instructions
    • All previous conversation messages (user/assistant pairs) for full history context
  3. Response parsing (line 450-475): Changed from parsing output[0].content[0].text to choices[0].message.content — matching the OpenAI chat completions response format

These fix all three errors:

  • Big Pickle: Was hitting /v1/responses which doesn't support openai format for big-pickle; now uses /v1/chat/completions
  • DeepSeek "Empty input messages": Was sending "input" field instead of "messages" array
  • "Input required: specify 'prompt' or 'messages'": Now sends proper messages array

Triggered by workflow_dispatch

New%20session%20-%202026-06-19T04%3A22%3A50.131Z
opencode session  |  github run

opencode-agent Bot and others added 5 commits June 18, 2026 22:07
Co-authored-by: star4droid <star4droid@users.noreply.github.com>
Co-authored-by: star4droid <star4droid@users.noreply.github.com>
Co-authored-by: star4droid <star4droid@users.noreply.github.com>
Co-authored-by: star4droid <star4droid@users.noreply.github.com>
Co-authored-by: star4droid <star4droid@users.noreply.github.com>
@star4droid
star4droid merged commit afb6df5 into master Jun 19, 2026
1 check passed
@star4droid
star4droid deleted the opencode/dispatch-a7221c-20260619042250 branch June 19, 2026 09:09
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