V1beta responseJsonSchema root anyOf/$ref support and HTTP 400 diagnostics

Could the Gemini Developer API team clarify the responseJsonSchema contract and diagnostic options for this case?

Offline captured serialization, with zero forwarded HTTP requests, produced byte-identical generation and full token-count bodies through installed @google/genai 1.50.1 and our REST client for both original synthetic test jobs. This does not establish provider acceptance.

One gemini-3.8-flash request (thinkingLevel LOW, maxOutputTokens 8192, no temperature field, 48,971 native generation bytes) returned HTTP 400 with matching error code 400/status INVALID_ARGUMENT. The bounded observer found readable JSON; the structured-detail scope is unknown. We retained no raw provider message, body or field path.

A separate gemini-2.5-flash request in the same schema family returned HTTP 500. No common cause has been established.

The responseJsonSchema root contains $defs and anyOf alternatives consisting of pure $ref objects. Every referenced root alternative is a complete typed closed object. Nested schemas include prefixItems, exact array bounds and enums. References have no sibling properties.

Questions:

  1. Is this root anyOf/$ref shape supported by v1beta generateContent responseJsonSchema when every referenced root is a complete object?
  2. What structured field/compiler diagnostic can identify the unsupported constraint or complexity limit in a rejected request? Is there a documented numeric limit or recommended diagnostic procedure?
  3. Is there a documented non-generating schema-validation method for this endpoint/model, and what authentication and billing rules apply?

No API keys, credentials, customer data, transcripts, report text or raw error bodies are included. We can prepare a sanitized synthetic schema reproduction if required. We are requesting contract clarification and diagnostic guidance.

Follow-up: we have prepared two entirely synthetic schema examples using the same template2 generator as the rejected request.

  • 01-baseline.json: root $defs plus anyOf containing three pure local $ref alternatives. Every referenced root alternative is a complete, typed, closed object.
  • 03-inline-root-alternatives.json: replaces only those three root references with inline copies of their targets. All 40 $defs names and bodies are retained unchanged, including definitions that become unused.

Nested structures include prefixItems, exact array bounds, string enums, intermediate unions, and forced-empty arrays that still declare items. Local structural comparison and modeled instance validation agree for this pair; this does not establish provider compiler equivalence.

Neither fixture has been submitted to Gemini. These reproduce the schema structure, not the original HTTP 400. They are smaller synthetic examples, not reconstructions of the original 48,971-byte request. They contain no API keys, credentials, customer data, transcripts, report text, or raw provider errors. No new generation or token-count requests were made to prepare them.

Could the Gemini Developer API team please clarify:

  1. Is the included baseline root anyOf / pure local $ref structure supported by v1beta generateContent.responseJsonSchema for the models in the original post? If any included construct is unsupported, which one?
  2. If acceptance depends on complexity, what structured field/compiler diagnostic, documented numeric limit, or recommended procedure can identify the rejected constraint? The original retained diagnostic does not establish whether error.details was absent, and we do not have the original error.message.
  3. Is there a documented non-generating schema-validation method for this endpoint/model, and what authentication and billing rules apply?

The forum accepts only image attachments, so the complete baseline is included below as compact JSON. Save it as 01-baseline.json. The local-only JavaScript then produces the exact reviewed inline comparison; it performs no network or SDK calls.

Complete synthetic baseline JSON (18,105 compact UTF-8 bytes)
{"$defs":{"quote":{"type":"object","properties":{"kind":{"type":"string","enum":["QUOTE"]},"turnId":{"type":"string","enum":["synthetic_turn_a","synthetic_turn_b"]},"startOffset":{"type":"integer","minimum":0,"maximum":120},"endOffset":{"type":"integer","minimum":1,"maximum":120}},"required":["kind","turnId","startOffset","endOffset"],"additionalProperties":false},"evidence":{"anyOf":[{"$ref":"#/$defs/quote"},{"type":"object","properties":{"kind":{"type":"string","enum":["OMISSION"]},"startSec":{"type":"number","minimum":0,"maximum":120},"endSec":{"type":"number","minimum":0,"maximum":120}},"required":["kind","startSec","endSec"],"additionalProperties":false}]},"r0i":{"anyOf":[{"$ref":"#/$defs/r0i_p0"},{"$ref":"#/$defs/r0i_p1"}]},"r1i":{"anyOf":[{"$ref":"#/$defs/r1i_p0"},{"$ref":"#/$defs/r1i_p1"},{"$ref":"#/$defs/r1i_p2"}]},"r2i":{"anyOf":[{"$ref":"#/$defs/r2i_p0"},{"$ref":"#/$defs/r2i_p1"}]},"r2o":{"type":"object","properties":{"id":{"type":"string","enum":["r_000000000000000000000002"]},"outcome":{"type":"string","enum":["UNKNOWN"]},"reason":{"type":"string","enum":["NOT_SELECTED"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":0}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"r3i":{"anyOf":[{"$ref":"#/$defs/r3i_p0"},{"$ref":"#/$defs/r3i_p1"}]},"r3o":{"type":"object","properties":{"id":{"type":"string","enum":["r_000000000000000000000003"]},"outcome":{"type":"string","enum":["UNKNOWN"]},"reason":{"type":"string","enum":["NOT_SELECTED"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":0}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"r4i":{"anyOf":[{"$ref":"#/$defs/r4i_p0"},{"$ref":"#/$defs/r4i_p1"},{"$ref":"#/$defs/r4i_p2"}]},"r4o":{"type":"object","properties":{"id":{"type":"string","enum":["r_000000000000000000000004"]},"outcome":{"type":"string","enum":["UNKNOWN"]},"reason":{"type":"string","enum":["NOT_SELECTED"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":0}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"r5e":{"type":"object","properties":{"id":{"type":"string","enum":["r_000000000000000000000005"]},"outcome":{"type":"string","enum":["NOT_APPLICABLE"]},"reason":{"type":"string","enum":["EXEMPT"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":0}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"r6e":{"type":"object","properties":{"id":{"type":"string","enum":["r_000000000000000000000006"]},"outcome":{"type":"string","enum":["NOT_APPLICABLE"]},"reason":{"type":"string","enum":["POLICY_NOT_REQUIRED"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":0}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"r7e":{"type":"object","properties":{"id":{"type":"string","enum":["r_000000000000000000000007"]},"outcome":{"type":"string","enum":["NOT_APPLICABLE"]},"reason":{"type":"string","enum":["OPTIONAL_DISABLED"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":0}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"r0i_p0":{"type":"object","properties":{"id":{"type":"string","enum":["r_000000000000000000000000"]},"outcome":{"type":"string","enum":["PASS","FAIL"]},"reason":{"type":"string","enum":["OBSERVED"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"r0i_p1":{"type":"object","properties":{"id":{"type":"string","enum":["r_000000000000000000000000"]},"outcome":{"type":"string","enum":["UNKNOWN"]},"reason":{"type":"string","enum":["INSUFFICIENT_EVIDENCE"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"r1i_p0":{"type":"object","properties":{"id":{"type":"string","enum":["r_000000000000000000000001"]},"outcome":{"type":"string","enum":["PASS","FAIL"]},"reason":{"type":"string","enum":["OBSERVED"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"r1i_p1":{"type":"object","properties":{"id":{"type":"string","enum":["r_000000000000000000000001"]},"outcome":{"type":"string","enum":["UNKNOWN"]},"reason":{"type":"string","enum":["INSUFFICIENT_EVIDENCE"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"r1i_p2":{"type":"object","properties":{"id":{"type":"string","enum":["r_000000000000000000000001"]},"outcome":{"type":"string","enum":["NOT_APPLICABLE"]},"reason":{"type":"string","enum":["NO_MONEY_DISCUSSION"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"r2i_p0":{"type":"object","properties":{"id":{"type":"string","enum":["r_000000000000000000000002"]},"outcome":{"type":"string","enum":["PASS","FAIL"]},"reason":{"type":"string","enum":["OBSERVED"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"r2i_p1":{"type":"object","properties":{"id":{"type":"string","enum":["r_000000000000000000000002"]},"outcome":{"type":"string","enum":["UNKNOWN"]},"reason":{"type":"string","enum":["INSUFFICIENT_EVIDENCE"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"r3i_p0":{"type":"object","properties":{"id":{"type":"string","enum":["r_000000000000000000000003"]},"outcome":{"type":"string","enum":["PASS","FAIL"]},"reason":{"type":"string","enum":["OBSERVED"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"r3i_p1":{"type":"object","properties":{"id":{"type":"string","enum":["r_000000000000000000000003"]},"outcome":{"type":"string","enum":["UNKNOWN"]},"reason":{"type":"string","enum":["INSUFFICIENT_EVIDENCE"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"r4i_p0":{"type":"object","properties":{"id":{"type":"string","enum":["r_000000000000000000000004"]},"outcome":{"type":"string","enum":["PASS","FAIL"]},"reason":{"type":"string","enum":["OBSERVED"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"r4i_p1":{"type":"object","properties":{"id":{"type":"string","enum":["r_000000000000000000000004"]},"outcome":{"type":"string","enum":["UNKNOWN"]},"reason":{"type":"string","enum":["INSUFFICIENT_EVIDENCE"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"r4i_p2":{"type":"object","properties":{"id":{"type":"string","enum":["r_000000000000000000000004"]},"outcome":{"type":"string","enum":["NOT_APPLICABLE"]},"reason":{"type":"string","enum":["NO_MONEY_DISCUSSION"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"b0_p0":{"type":"object","properties":{"id":{"type":"string","enum":["ACTIVE_LISTENING"]},"outcome":{"type":"string","enum":["PASS","FAIL"]},"reason":{"type":"string","enum":["OBSERVED"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"b0_p1":{"type":"object","properties":{"id":{"type":"string","enum":["ACTIVE_LISTENING"]},"outcome":{"type":"string","enum":["UNKNOWN"]},"reason":{"type":"string","enum":["INSUFFICIENT_EVIDENCE"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"b0":{"anyOf":[{"$ref":"#/$defs/b0_p0"},{"$ref":"#/$defs/b0_p1"}]},"b1_p0":{"type":"object","properties":{"id":{"type":"string","enum":["EMPATHY_RESPECT"]},"outcome":{"type":"string","enum":["PASS","FAIL"]},"reason":{"type":"string","enum":["OBSERVED"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"b1_p1":{"type":"object","properties":{"id":{"type":"string","enum":["EMPATHY_RESPECT"]},"outcome":{"type":"string","enum":["UNKNOWN"]},"reason":{"type":"string","enum":["INSUFFICIENT_EVIDENCE"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"b1":{"anyOf":[{"$ref":"#/$defs/b1_p0"},{"$ref":"#/$defs/b1_p1"}]},"b2_p0":{"type":"object","properties":{"id":{"type":"string","enum":["CLEAR_NEXT_STEP"]},"outcome":{"type":"string","enum":["PASS","FAIL"]},"reason":{"type":"string","enum":["OBSERVED"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"b2_p1":{"type":"object","properties":{"id":{"type":"string","enum":["CLEAR_NEXT_STEP"]},"outcome":{"type":"string","enum":["UNKNOWN"]},"reason":{"type":"string","enum":["INSUFFICIENT_EVIDENCE"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"b2":{"anyOf":[{"$ref":"#/$defs/b2_p0"},{"$ref":"#/$defs/b2_p1"}]},"b3_p0":{"type":"object","properties":{"id":{"type":"string","enum":["APPROPRIATE_HANDLING"]},"outcome":{"type":"string","enum":["PASS","FAIL"]},"reason":{"type":"string","enum":["OBSERVED"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"b3_p1":{"type":"object","properties":{"id":{"type":"string","enum":["APPROPRIATE_HANDLING"]},"outcome":{"type":"string","enum":["UNKNOWN"]},"reason":{"type":"string","enum":["INSUFFICIENT_EVIDENCE"]},"explanation":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/evidence"},"minItems":0,"maxItems":4}},"required":["id","outcome","reason","explanation","evidence"],"additionalProperties":false},"b3":{"anyOf":[{"$ref":"#/$defs/b3_p0"},{"$ref":"#/$defs/b3_p1"}]},"root0":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["triage-result.v1"]},"processingHash":{"type":"string","enum":["0ddbe4caefb7b32bff1b51c2bf46d1f02440bf5cfa8c49564ad87c62f205f0e6"]},"transcriptHash":{"type":"string","enum":["0ffd60186213046d4e6af710d6d82c705b987479f8ef6f68869c9b5dd73fb059"]},"objective":{"type":"object","properties":{"status":{"type":"string","enum":["MATCH"]},"objectiveId":{"type":"string","enum":["SYNTH_ALPHA"]},"confidence":{"type":"string","enum":["HIGH","MEDIUM","LOW"]},"reason":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/quote"},"minItems":0,"maxItems":4}},"required":["status","objectiveId","confidence","reason","evidence"],"additionalProperties":false},"callType":{"type":"string","enum":["Sales","Customer Service","Tech Support","Billing","Retention","Inbound Inquiry","VOICEMAIL","WRONG_NUMBER","MIXED","UNKNOWN"]},"quality":{"type":"object","properties":{"incomplete":{"type":"boolean"},"inaudible":{"type":"boolean"}},"required":["incomplete","inaudible"],"additionalProperties":false},"rules":{"type":"array","minItems":8,"maxItems":8,"prefixItems":[{"$ref":"#/$defs/r0i"},{"$ref":"#/$defs/r1i"},{"$ref":"#/$defs/r2i"},{"$ref":"#/$defs/r3o"},{"$ref":"#/$defs/r4i"},{"$ref":"#/$defs/r5e"},{"$ref":"#/$defs/r6e"},{"$ref":"#/$defs/r7e"}]},"behaviors":{"type":"array","minItems":4,"maxItems":4,"prefixItems":[{"$ref":"#/$defs/b0"},{"$ref":"#/$defs/b1"},{"$ref":"#/$defs/b2"},{"$ref":"#/$defs/b3"}]},"signals":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["PROFANITY","HOSTILE_LANGUAGE","FRICTION"]},"evidence":{"type":"array","items":{"$ref":"#/$defs/quote"},"minItems":1,"maxItems":4}},"required":["kind","evidence"],"additionalProperties":false},"minItems":0,"maxItems":16}},"required":["schemaVersion","processingHash","transcriptHash","objective","callType","quality","rules","behaviors","signals"],"additionalProperties":false},"root1":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["triage-result.v1"]},"processingHash":{"type":"string","enum":["0ddbe4caefb7b32bff1b51c2bf46d1f02440bf5cfa8c49564ad87c62f205f0e6"]},"transcriptHash":{"type":"string","enum":["0ffd60186213046d4e6af710d6d82c705b987479f8ef6f68869c9b5dd73fb059"]},"objective":{"type":"object","properties":{"status":{"type":"string","enum":["MATCH"]},"objectiveId":{"type":"string","enum":["SYNTH_BETA"]},"confidence":{"type":"string","enum":["HIGH","MEDIUM","LOW"]},"reason":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/quote"},"minItems":0,"maxItems":4}},"required":["status","objectiveId","confidence","reason","evidence"],"additionalProperties":false},"callType":{"type":"string","enum":["Sales","Customer Service","Tech Support","Billing","Retention","Inbound Inquiry","VOICEMAIL","WRONG_NUMBER","MIXED","UNKNOWN"]},"quality":{"type":"object","properties":{"incomplete":{"type":"boolean"},"inaudible":{"type":"boolean"}},"required":["incomplete","inaudible"],"additionalProperties":false},"rules":{"type":"array","minItems":8,"maxItems":8,"prefixItems":[{"$ref":"#/$defs/r0i"},{"$ref":"#/$defs/r1i"},{"$ref":"#/$defs/r2o"},{"$ref":"#/$defs/r3i"},{"$ref":"#/$defs/r4o"},{"$ref":"#/$defs/r5e"},{"$ref":"#/$defs/r6e"},{"$ref":"#/$defs/r7e"}]},"behaviors":{"type":"array","minItems":4,"maxItems":4,"prefixItems":[{"$ref":"#/$defs/b0"},{"$ref":"#/$defs/b1"},{"$ref":"#/$defs/b2"},{"$ref":"#/$defs/b3"}]},"signals":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["PROFANITY","HOSTILE_LANGUAGE","FRICTION"]},"evidence":{"type":"array","items":{"$ref":"#/$defs/quote"},"minItems":1,"maxItems":4}},"required":["kind","evidence"],"additionalProperties":false},"minItems":0,"maxItems":16}},"required":["schemaVersion","processingHash","transcriptHash","objective","callType","quality","rules","behaviors","signals"],"additionalProperties":false},"root2":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["triage-result.v1"]},"processingHash":{"type":"string","enum":["0ddbe4caefb7b32bff1b51c2bf46d1f02440bf5cfa8c49564ad87c62f205f0e6"]},"transcriptHash":{"type":"string","enum":["0ffd60186213046d4e6af710d6d82c705b987479f8ef6f68869c9b5dd73fb059"]},"objective":{"type":"object","properties":{"status":{"type":"string","enum":["NO_MATCH","AMBIGUOUS"]},"objectiveId":{"type":"null"},"confidence":{"type":"string","enum":["HIGH","MEDIUM","LOW"]},"reason":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/$defs/quote"},"minItems":0,"maxItems":4}},"required":["status","objectiveId","confidence","reason","evidence"],"additionalProperties":false},"callType":{"type":"string","enum":["Sales","Customer Service","Tech Support","Billing","Retention","Inbound Inquiry","VOICEMAIL","WRONG_NUMBER","MIXED","UNKNOWN"]},"quality":{"type":"object","properties":{"incomplete":{"type":"boolean"},"inaudible":{"type":"boolean"}},"required":["incomplete","inaudible"],"additionalProperties":false},"rules":{"type":"array","minItems":8,"maxItems":8,"prefixItems":[{"$ref":"#/$defs/r0i"},{"$ref":"#/$defs/r1i"},{"$ref":"#/$defs/r2o"},{"$ref":"#/$defs/r3o"},{"$ref":"#/$defs/r4o"},{"$ref":"#/$defs/r5e"},{"$ref":"#/$defs/r6e"},{"$ref":"#/$defs/r7e"}]},"behaviors":{"type":"array","minItems":4,"maxItems":4,"prefixItems":[{"$ref":"#/$defs/b0"},{"$ref":"#/$defs/b1"},{"$ref":"#/$defs/b2"},{"$ref":"#/$defs/b3"}]},"signals":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["PROFANITY","HOSTILE_LANGUAGE","FRICTION"]},"evidence":{"type":"array","items":{"$ref":"#/$defs/quote"},"minItems":1,"maxItems":4}},"required":["kind","evidence"],"additionalProperties":false},"minItems":0,"maxItems":16}},"required":["schemaVersion","processingHash","transcriptHash","objective","callType","quality","rules","behaviors","signals"],"additionalProperties":false}},"anyOf":[{"$ref":"#/$defs/root0"},{"$ref":"#/$defs/root1"},{"$ref":"#/$defs/root2"}]}
const fs = require("node:fs");
const schema = JSON.parse(fs.readFileSync("01-baseline.json", "utf8"));
const inline = structuredClone(schema);
inline.anyOf = schema.anyOf.map(({ $ref }) =>
  structuredClone(schema.$defs[$ref.slice("#/$defs/".length)])
);
fs.writeFileSync(
  "03-inline-root-alternatives.json",
  JSON.stringify(inline, null, 2) + "\n",
  { flag: "wx" }
);

Integrity checks (SHA-256):

  • Baseline after parsing and JSON.stringify(schema) with no trailing newline: cd8480dff567b202d2722ee5c1cccf6e33b07c1f7fc56562732573d90d066550.
  • Inline output file from the script (two-space indentation and one trailing LF): 8fc6f9e384691b7da2367c39c2bfa0fcad00daa9d5f8cdd2ef13998dc8024b03.

Update on the synthetic v1beta generateContent controls in this topic.

  • Gemini 2.5 Flash and 3.8 Flash both admitted our compact 1,668-byte schema with root anyOf branches made of pure local $ref objects. Both returned readable JSON. Our deeper report checks rejected those outputs.
  • On Gemini 2.5 Flash, the same 22,831-byte schema and synthetic workload returned 400 with the flat response-format fields and 200 with nested generationConfig.responseFormat.text. Both preflights counted 5,804 tokens. The nested response reached native STOP, but its report text did not parse as JSON.
  • On Gemini 3.8 Flash, the original 26,193-byte nested schema, a 22,399-byte reachable full schema, a 20,175-byte enum-only variant, and a 14,144-byte reason-code variant returned 400. The last two complete error envelopes had no structured details. A separate Gemini 2.5 Flash full-schema request returned 500 INTERNAL.

Can the Gemini API team confirm which internal stage rejects the richer requests and whether an allowlist, grammar complexity limit, or another documented constraint applies? For the matched Gemini 2.5 request, can you tell whether the nested 200 completed the same structured-output checks as the flat form? If these require backend correlation, is there a private support channel for the minimum identifiers?

The highest-value UTC windows on November 6, 2026 are the 2.5 flat rejection at 06:28:46.720–06:28:50.411, its nested response at 11:49:03.381–11:49:23.049, the 3.8 compact root-reference control at 12:34:18.014–12:34:26.275, and the 3.8 reason-code rejection at 14:05:42.753–14:05:43.878. These are local intent-to-terminal windows. We have the corresponding client request digests. All requests used synthetic inputs.

For cross-reference, I also opened an issue in the Google Gen AI JavaScript SDK repository: googleapis/js-genai #2161.

I’m linking it here so the SDK maintainers and Gemini API team can follow both reports. This forum topic contains the fuller investigation and subsequent synthetic test results, including the compact root anyOf / local $ref controls that were accepted by both models, as described above.