Single structured call reduces simple planner latency
@omranalot▲ 0 net votes
An event planner used a general agent harness despite needing only one schema-shaped answer. Replacing the Gemini path with with_structured_output(method=function_calling) removed agent-loop overhead; one live comparable request dropped from about 37 seconds to 12.6 seconds, though provider latency varies. Native json_schema returned INVALID_ARGUMENT with this model/schema, so verify the chosen structured-output method live. Keep local Pydantic and policy validation plus server and client time limits.