SShortSingh.
Back to feed

Treat Gemini Structured Output as a Versioned API to Prevent Agent Breakage

0
·26 views

When applications rely on structured JSON output from Gemini, that output effectively becomes an API contract, meaning field changes or new enum values can silently break downstream consumers. Developers are advised to embed schema version identifiers directly in persisted output values rather than relying solely on deployment configuration. Google's Gemini SDK supports JSON Schema alongside Zod validation, enabling stricter runtime checks at the application boundary. Structured generation handles syntax and shape validation, but semantic and policy-level checks — such as verifying referenced evidence IDs exist or confirming an action is permitted — remain the application's responsibility. Different validation failures require different handling strategies, and policy violations in particular should be blocked rather than re-prompted until the model produces a compliant answer.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

JANISSARY: A Differential DAST Tool Aimed at Verified, Actionable Security Findings

A developer is building JANISSARY, a differential Dynamic Application Security Testing tool designed to make security testing results more meaningful and evidence-driven. The project separates initial discovery of unusual application behaviour from the verification of actual vulnerabilities. Its stated principles include transparency about whether outcomes are verified, unproven or inconclusive, and prioritising useful findings over sheer volume. The developer plans to share progress, technical decisions and lessons learned publicly via GitHub as the tool evolves.

0
ProgrammingDEV Community ·

INFINITT PACS System Manager Flaws Allow Local Privilege Escalation and Code Execution

CERT/CC published advisory VU#203719 on November 2, 2026, describing two code execution vulnerabilities in INFINITT PACS System Manager versions 3.0.11.3 and 3.0.11.5. The first, CVE-2026-16305, stems from weak file permissions on execlist.txt, which a low-privileged local user could modify so that an approved update runs added commands with administrative privileges. The second, CVE-2026-16306, affects the imodular:// URI handler in IModular.exe, which executes commands from crafted links without validating them, letting an attacker run code with the user's privileges when a victim opens a malicious link. INFINITT Healthcare lists versions 3.0.12.3 and 3.0.12.5 as fixed. The advisory reports no evidence of exploitation, but administrators are advised to check versions, file permissions and URI handler registration on PACS workstations. Interim measures include restricting local logons and shared use, limiting reachable network shares and blocking malicious URI links where possible.

0
ProgrammingDEV Community ·

Supreme Court to Hear Apple's Appeal in Epic Games Contempt Case

The U.S. Supreme Court is set to hear oral arguments on January 11, 2027, in Apple Inc. v. Epic Games, Inc. The case concerns whether Apple should be held in civil contempt for allegedly violating the spirit of a court injunction that removed its commission on purchases made outside the App Store. Apple contends the injunction's wording did not explicitly bar commissions on external sales, while Epic argues the continued fees undermine the order's purpose. The Court will not decide whether Apple may charge such commissions, an issue still pending in lower courts. The ruling could set a precedent for how injunctions against major tech platforms are interpreted.

0
ProgrammingDEV Community ·

Salesforce Custom Metadata Types vs Custom Settings: Choosing the Right Option

Salesforce developers often mix up Custom Settings and Custom Metadata Types, though they store configuration differently. Custom Settings hold org-specific data that is not deployed with code, and their Hierarchy variant can vary values by profile or user. Custom Metadata Types are deployed as metadata through change sets, packages, and the Metadata API, so they move reliably between environments. Custom Metadata cannot be modified by Apex at runtime and has no per-user cascade, so it suits deployment-time settings only. The article recommends a simple rule: use Custom Metadata for stable configuration and Custom Settings or custom objects for values that change at runtime.