fix: OpenAI tool schema compatibility

This commit is contained in:
Peter Steinberger
2026-01-05 00:15:42 +01:00
parent c3c9dee65e
commit 435edaf997
5 changed files with 138 additions and 133 deletions

View File

@@ -364,6 +364,8 @@ export async function runEmbeddedPiAgent(params: {
await loadWorkspaceBootstrapFiles(resolvedWorkspace);
const contextFiles = buildBootstrapContextFiles(bootstrapFiles);
const promptSkills = resolvePromptSkills(skillsSnapshot, skillEntries);
// Tool schemas must be provider-compatible (OpenAI requires top-level `type: "object"`).
// `createClawdbotCodingTools()` normalizes schemas so the session can pass them through unchanged.
const tools = createClawdbotCodingTools({
bash: {
...params.config?.agent?.bash,