Return errors from schema generation instead of panicking

jsonSchemaFor panicked on unsupported types, which meant
FunctionTool, NewOutputType, and RunTyped would crash the
process during setup rather than returning a normal error.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-03-13 18:56:56 +01:00
parent def8f417ca
commit f3239a1a7b
12 changed files with 505 additions and 406 deletions

View File

@@ -40,7 +40,7 @@ type (
)
var (
agentToolParamsSchema = jsonSchemaFor[agentToolParams]()
agentToolParamsSchema = mustJSONSchemaFor[agentToolParams]()
)
func agentToolDepth(ctx context.Context) int {