fix(goal-executor): replace z.record() with z.object().passthrough() in Anthropic schemas#146
Conversation
…in Anthropic schemas
z.record(z.string(), z.string()) emits a JSON Schema with the `propertyNames`
keyword. Anthropic's structured-output validator rejects that keyword with
HTTP 400 — OpenAI and Google accept it without complaint, so the failure
only surfaced on the Anthropic call path.
Replaces `permissions` and `arguments` in `launchAppGrounderSchema` with
z.object({}).passthrough(): an open-ended object schema with no keyword
constraints. Runtime behaviour is unchanged.
Fixes final-run#100
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR loosens validation in the launch-app grounder schema by changing ChangesAnthropic Provider Schema Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
z.record(z.string(), z.string())inlaunchAppGrounderSchemaemits a JSON Schema with thepropertyNameskeyword. Anthropic's structured-output validator rejects that keyword with HTTP 400, so any run that routes through the Anthropic path and reaches alaunch_appgrounder call fails at the API boundary.propertyNameswithout complaint, which is why this went unnoticed — the failure only surfaces on the Anthropic call path.permissionsandarguments) withz.object({}).passthrough()— an open-ended object schema with no keyword constraints — preserving the same runtime behaviour while satisfying the Anthropic validator.Test plan
launch_appgrounder call on the Anthropic path and confirm it no longer returns HTTP 400.Closes #100
Summary by CodeRabbit