Repository navigation
Description
Summary
After upgrading to v2026.6.1 (from v2026.5.27), all Gemini model requests via jjcc provider (OpenAI-compatible openai-completions API) fail with 400 Unable to submit request because functionDeclaration schema didn't specify the schema type field.
- ✅ Works:
stepfun/step-router-v1(OpenAI-compat schema) - ❌ Broken:
jjcc/gemini-3.1-pro-preview,jjcc/gemini-3.1-pro-preview-customtools
Root Cause
The cron tool schema uses anyOf for optional properties without an explicit type keyword at the property level:
{
"sessionKey": {
"anyOf": [
{ "type": "string" },
{ "type": "null" }
]
}
}jjcc's Gemini translation layer requires a type field on every property. The anyOf construct at the top level of a property definition (instead of inline type) causes Gemini to reject the entire request.
Error Logs (rotating among affected fields each request)
400: cron functionDeclaration `***.***.sessionKey` schema didn't specify the schema type field
400: cron functionDeclaration `***.***.agentId` schema didn't specify the schema type field
400: cron functionDeclaration `***.***.***.toolsAllow` schema didn't specify the schema type field
400: cron functionDeclaration `***.***.***.channel` schema didn't specify the schema type field
Note: each request hits a different affected field, suggesting jjcc's API iterates through and rejects on the first invalid one.
Affected Fields (all optional cron tool properties)
sessionKeyagentIdtoolsAllowchannel(nested indelivery)
Workaround
Fall back to a non-Gemini provider (e.g., stepfun/step-router-v1).
Related
- MCP server anyOf schemas rejected by DeepSeek - should strip at gateway level #83361 — similar anyOf rejection issue for DeepSeek (closed)
Environment
- OpenClaw: v2026.6.1
- Provider: jjcc (OpenAI-compat, api:
openai-completions) - Model:
gemini-3.1-pro-preview - Node.js: v24.15.0
- OS: Linux 6.6.87 (WSL2)
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 9, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 21, 2026, 3:42 PM ET / 19:42 UTC.
Summary
Keep open. Current main and the latest release still select Gemini schema cleanup from the provider id only, so
jjccwith a Gemini model id can still miss the cleanup path; the open linked PR remains the focused fix candidate.Reproducibility: yes. source-reproducible: current main and
v2026.6.9leavejjccwith a Gemini model id outside the Gemini cleanup branch while cron schemas still contain nullableanyOffields matching the reported errors. A live jjcc/Gemini request was not run in this read-only review.Root-cause cluster
Relationship:
canonicalCanonical: #91542
Summary: This issue is the canonical report for the jjcc/OpenAI-compatible Gemini cron schema rejection; the open focused PR is the current implementation candidate, while broader provider-projection PRs overlap but have not replaced it.
Members:
fixed_by_candidate: fix(agents): clean Gemini tool schemas by model id #91559 - The PR is open, mergeable, uses closing syntax for this issue, and targets the same Gemini model-id schema cleanup.superseded: fix(agents): apply Gemini schema cleaning for Gemini models via OpenAI-compat providers #91714 - The PR targeted the same model-id Gemini cleanup but is closed unmerged, so it is not a viable canonical landing path.superseded: fix(schema): clean tool schemas for Gemini model ids #91850 - The PR also targeted Gemini model-id schema cleaning but is closed unmerged and lacked local validation.partial_overlap: fix(agents): project cron tool schemas for providers #88878 - The draft maintainer PR changes broader provider-facing cron schema projection and overlaps the nullable schema symptom, but it is not merged and has review blockers.partial_overlap: fix(agents): project nullable tool schemas for providers #88880 - The maintainer PR addresses broader nullable provider-schema projection, but it is conflicting and does not replace the focused linked PR.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Next step
No duplicate repair job is needed because #91559 is already open, mergeable, and focused on this issue.
Review details
Best possible solution:
Review and land #91559, or an equivalent central normalizer fix, then close this issue after the fix reaches main.
Do we have a high-confidence way to reproduce the issue?
Yes, source-reproducible: current main and
v2026.6.9leavejjccwith a Gemini model id outside the Gemini cleanup branch while cron schemas still contain nullableanyOffields matching the reported errors. A live jjcc/Gemini request was not run in this read-only review.Is this the best way to solve the issue?
Yes, the linked central-normalizer fix is the best narrow shape because that layer already receives provider id, model id, and model compatibility. A cron-specific or jjcc-specific rewrite would duplicate provider-schema policy in the wrong place.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
v2026.6.9can still hit the reported provider-schema rejection.Codex review notes: model internal, reasoning high; reviewed against 6daf9307e0b9.
Label changes
Label justifications:
P2: This is a normal-priority provider/model compatibility regression with a clear source path and limited Gemini-over-OpenAI-compatible blast radius.impact:auth-provider: The reported failure blocks provider/model routing for Gemini models behind an OpenAI-compatible provider.Evidence reviewed
What I checked:
anyOfwhere providers reject it. (AGENTS.md:14, 6daf9307e0b9)normalizeToolParameterSchemaUncachednormalizesmodelProvider, then computesisGeminiProvideronly from provider strings containinggoogleorgemini; it does not consultmodelIdormodelCompat.toolSchemaProfile. (src/agents/agent-tools-parameter-schema.ts:771, 6daf9307e0b9)modelProvider,modelId, andmodelCompatintonormalizeToolParameters, so the central normalizer is the narrow repair boundary. (src/agents/agent-tools.ts:1212, 6daf9307e0b9)agentId,sessionKey, andtoolsAllowuse those helpers, matching the reported provider rejection paths when Gemini cleanup is not selected. (src/agents/tools/cron-tool.ts:82, 6daf9307e0b9)src/agents/schema/clean-for-gemini.ts:190, 6daf9307e0b9)src/llm/providers/openai-completions.ts:1176, 6daf9307e0b9)Likely related people:
src/agents/agent-tools-parameter-schema.ts,src/agents/tools/cron-tool.ts,src/agents/tools/cron-tool.schema.test.ts)src/plugins/provider-model-compat.ts,src/agents/schema/clean-for-gemini.ts,src/agents/agent-tools-parameter-schema.ts)ca76e2fedc8eadded typed cron job and patch schema properties, including the model-facing fields involved in the reported rejection path. (role: introduced related cron schema behavior; confidence: medium; commits: ca76e2fedc8e; files:src/agents/tools/cron-tool.ts,src/agents/tools/cron-tool.schema.test.ts)8c1ca1f24517removed OpenAPI 3.0-incompatible cron schema keywords for Gemini-backed validators in the same provider compatibility area. (role: adjacent Gemini schema contributor; confidence: medium; commits: 8c1ca1f24517; files:src/agents/schema/clean-for-gemini.ts,src/agents/tools/cron-tool.ts,src/agents/tools/cron-tool.schema.test.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.