lookupSchema returns the structured-output schema for name, or nil when the shape is free-form (e.g. the default additional_context).
(name string)
| 91 | // lookupSchema returns the structured-output schema for name, or nil |
| 92 | // when the shape is free-form (e.g. the default additional_context). |
| 93 | func lookupSchema(name string) *latest.StructuredOutput { |
| 94 | if name == "" { |
| 95 | return nil |
| 96 | } |
| 97 | s, _ := modelRegistry.schemas.Load(name) |
| 98 | return s |
| 99 | } |
| 100 | |
| 101 | // defaultShape passes the model's reply through as additional_context. |
| 102 | // Useful for turn_start summarizers, post_tool_use commentary, etc. — |