@@ -13,7 +13,6 @@ import (
1313 "github.com/charmbracelet/catwalk/pkg/catwalk"
1414 "github.com/charmbracelet/crush/internal/csync"
1515 "github.com/charmbracelet/crush/internal/env"
16− "github.com/invopop/jsonschema"
1716 "github.com/tidwall/sjson"
1817)
1918
@@ -46,16 +45,6 @@ const (
4645 SelectedModelTypeSmall SelectedModelType = "small"
4746)
4847
49−// JSONSchema returns the JSON schema for SelectedModelType
50−func (SelectedModelType) JSONSchema() *jsonschema.Schema {
51− return &jsonschema.Schema{
52− Type: "string",
53− Description: "Model type selection for different use cases",
54− Enum: []any{"large", "small"},
55− Default: "large",
56− }
57−}
58−
5948type SelectedModel struct {
6049 // The model id as used by the provider API.
6150 // Required.
@@ -111,16 +100,6 @@ const (
111100 MCPHttp MCPType = "http"
112101)
113102
114−// JSONSchema returns the JSON schema for MCPType
115−func (MCPType) JSONSchema() *jsonschema.Schema {
116− return &jsonschema.Schema{
117− Type: "string",
118− Description: "Type of MCP connection protocol",
119− Enum: []any{"stdio", "sse", "http"},
120− Default: "stdio",
121− }
122−}
123−
124103type MCPConfig struct {
125104 Command string `json:"command,omitempty" jsonschema:"description=Command to execute for stdio MCP servers,example=npx"`
126105 Env map[string]string `json:"env,omitempty" jsonschema:"description=Environment variables to set for the MCP server"`
@@ -239,7 +218,7 @@ type Agent struct {
239218 // This is the id of the system prompt used by the agent
240219 Disabled bool `json:"disabled,omitempty"`
241220
242− Model SelectedModelType `json:"model"`
221+ Model SelectedModelType `json:"model" jsonschema:"required,description=The model type to use for this agent,enum=large,enum=small,default=large"`
243222
244223 // The available tools for the agent
245224 // if this is nil, all tools are available