mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-20 18:57:17 +03:00
feat(core): use freeform tool input on models that support it (#61703)
This commit is contained in:
committed by
GitHub
Unverified
parent
64bd35afa9
commit
53f2d631df
@@ -369,12 +369,8 @@ export const Message = withStatics(messageSchema, {
|
||||
* Raw-text wire encoding for a tool with exactly one required string parameter. Models that accept the format
|
||||
* write that parameter's value directly instead of JSON arguments; calls still decode to the normal object input.
|
||||
*/
|
||||
export const Freeform = Schema.Union([
|
||||
Schema.Struct({ type: Schema.Literal("text") }),
|
||||
Schema.Struct({ type: Schema.Literal("regex"), pattern: Schema.String }),
|
||||
Schema.Struct({ type: Schema.Literal("lark"), grammar: Schema.String }),
|
||||
]).annotate({ identifier: "LLM.Freeform" })
|
||||
export type Freeform = Schema.Schema.Type<typeof Freeform>
|
||||
export const Freeform = Tool.Freeform
|
||||
export type Freeform = Tool.Freeform
|
||||
|
||||
const toolDefinitionFields = {
|
||||
name: Schema.String,
|
||||
|
||||
Reference in New Issue
Block a user