lookupShape returns the [ResponseShape] for name, falling back to [defaultShape] for the empty name.
(name string)
| 82 | // lookupShape returns the [ResponseShape] for name, falling back to |
| 83 | // [defaultShape] for the empty name. |
| 84 | func lookupShape(name string) (ResponseShape, bool) { |
| 85 | if name == "" { |
| 86 | return defaultShape, true |
| 87 | } |
| 88 | return modelRegistry.shapes.Load(name) |
| 89 | } |
| 90 | |
| 91 | // lookupSchema returns the structured-output schema for name, or nil |
| 92 | // when the shape is free-form (e.g. the default additional_context). |