Repository navigation
Commit 197a676
sangyinghao
fix(opencode): preserve custom tool arg descriptions in LLM prompts
Use zodToJsonSchema() instead of z.toJSONSchema() for converting custom
tool parameter schemas. The built-in z.toJSONSchema() drops .describe()
metadata from dynamically imported Zod schemas, so LLMs never see the
argument descriptions users define on their custom tools.
Closes anomalyco#43571 parent b06afd6 commit 197a676
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
781 | 783 | | |
782 | 784 | | |
783 | 785 | | |
784 | | - | |
| 786 | + | |
785 | 787 | | |
786 | 788 | | |
787 | 789 | | |
| |||
0 commit comments