Skip to content

fix: request assistant reply for structured output#141

Open
huilang021x wants to merge 1 commit into
tickernelz:mainfrom
huilang021x:fix/structured-output-noreply
Open

fix: request assistant reply for structured output#141
huilang021x wants to merge 1 commit into
tickernelz:mainfrom
huilang021x:fix/structured-output-noreply

Conversation

@huilang021x

Copy link
Copy Markdown
Contributor

Summary

  • What changed: Use noReply: false for transient OpenCode structured-output prompts and update the opencode-provider regression test.
  • Why: OpenCode treats noReply: true as context-only, returning before the assistant loop that populates info.structured.
  • Current phase: Ready for review.

Scope

  • In scope: generateStructuredOutput() calls through OpenCode v2 session.prompt; related unit test expectation.
  • Out of scope: External provider implementations, auto-capture retry behavior, embedding/search behavior.
  • Risk level: Low; the structured request already uses a transient session that is deleted afterward.

Deployment Targets

  • Impacted services: OpenCode plugin runtime only.
  • Restart/deploy needed: Users need to restart OpenCode after updating the plugin.
  • Target environment: Any environment using opencodeProvider + opencodeModel for auto-capture/profile structured output.
  • Rollback note: Revert this commit to restore the previous noReply: true request behavior.

Acceptance Plan

  • Acceptance criteria: Structured-output prompts enter the assistant loop and return info.structured; transient sessions are still deleted.
  • Evidence to collect: Unit and full test suite results.
  • Required checks: Repository CI, if configured.
  • Manual verification needed: Optional, against a live OpenCode server/provider.

Validation

  • Commands run:
    • bun test tests/opencode-provider.test.ts
    • bun run typecheck
    • bun run format:check
    • bun run build && bun test
  • Result: Passed.
  • Evidence links/log snippets: Final full test run: 156 pass, 0 fail.

@huilang021x

Copy link
Copy Markdown
Contributor Author

@codex please review this PR when you have a chance.

Context: this fixes OpenCode structured output usage by requesting an assistant reply instead of noReply: true, which currently produces no info.structured.

@huilang021x

Copy link
Copy Markdown
Contributor Author

@codex review 5961ae1

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