You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
llminternal: OutputSchema mutations leak across requests #1792
basicRequestProcessor assigns state.OutputSchema directly to req.Config.ResponseSchema (source). Both fields reference the same *genai.Schema, so a BeforeModel callback can modify the agent's schema and affect other requests. A shallow struct copy would still share the Properties map and nested schema pointers.
Reproduction:
Configure an agent with no tools and an OutputSchema containing a string property named answer.
In a BeforeModel callback, change the request's answer property type to genai.TypeNumber.
Check the original OutputSchema and another request's schema.
Expected: Both still describe answer as a string.
Actual: Both now describe it as a number.
Reproduction test and command
Append this test to internal/llminternal/basic_processor_test.go; it uses the existing imports and test helpers.
Activity