Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/services/ai/opencode-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ export async function generateStructuredOutput<T>(opts: StructuredOutputOptions<
schema: jsonSchema as Record<string, unknown>,
...(retryCount !== undefined ? { retryCount } : {}),
},
noReply: true,
// Structured output is produced by opencode's assistant loop; noReply is
// context-only and returns before `info.structured` can be populated.
noReply: false,
});

const data = (
Expand Down
2 changes: 1 addition & 1 deletion tests/opencode-provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ describe("generateStructuredOutput", () => {
modelID: "gpt-4o-mini",
});
expect(promptBody.system).toBe("system");
expect(promptBody.noReply).toBe(true);
expect(promptBody.noReply).toBe(false);
const format = promptBody.format as Record<string, unknown>;
expect(format.type).toBe("json_schema");
expect(format.schema).toBeDefined();
Expand Down