Problem
Running finalrun cloud test ... --platform android with FINALRUN_LLM_PROVIDER=anthropic fails on the first grounder call with:
AI provider error (anthropic/claude-opus-4-7, HTTP 400):
output_config.format.schema: For 'object' type, property 'propertyNames' is not supported
Reproduces on all Claude models (Opus 4.7, Sonnet 4.6, Haiku 4.5) — it's an API-level rejection, not model-specific. Gemini and OpenAI work fine.
Root cause
packages/goal-executor/src/ai/schemas.ts → launchAppGrounderSchema:
permissions: z.record(z.string(), z.string()).optional(),
arguments: z.record(z.string(), z.string()).optional(),
z.record(...) compiles to a JSON Schema with propertyNames. OpenAI and Google accept it; Anthropic's structured-output validator rejects it outright.
Reproduce
- Set
FINALRUN_LLM_PROVIDER=anthropic, any Claude model, valid API key
- Run any test that triggers the launch-app grounder (first step of most runs)
- Observe HTTP 400 from Anthropic
Suggested fix
Replace z.record(z.string(), z.string()) with z.object({}).passthrough() for both fields:
permissions: z.object({}).passthrough().optional(),
arguments: z.object({}).passthrough().optional(),
This emits an open-ended object schema without propertyNames, which all three providers accept. Verified locally by patching dist/ai/schemas.js — Claude runs succeed after restart.
Worth grepping the rest of the schemas module for other z.record() uses — same failure pattern will apply to any of them.
Environment
@finalrun/finalrun-agent 0.1.7
- Node 20+, macOS
- Cloud-server + device-node setup (same issue reproduces with the standalone CLI)
Problem
Running
finalrun cloud test ... --platform androidwithFINALRUN_LLM_PROVIDER=anthropicfails on the first grounder call with:Reproduces on all Claude models (Opus 4.7, Sonnet 4.6, Haiku 4.5) — it's an API-level rejection, not model-specific. Gemini and OpenAI work fine.
Root cause
packages/goal-executor/src/ai/schemas.ts→launchAppGrounderSchema:z.record(...)compiles to a JSON Schema withpropertyNames. OpenAI and Google accept it; Anthropic's structured-output validator rejects it outright.Reproduce
FINALRUN_LLM_PROVIDER=anthropic, any Claude model, valid API keySuggested fix
Replace
z.record(z.string(), z.string())withz.object({}).passthrough()for both fields:This emits an open-ended object schema without
propertyNames, which all three providers accept. Verified locally by patchingdist/ai/schemas.js— Claude runs succeed after restart.Worth grepping the rest of the schemas module for other
z.record()uses — same failure pattern will apply to any of them.Environment
@finalrun/finalrun-agent0.1.7