Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

feat: add model settings schema to stainless [LET-5976] (#5872)

jnjpng744fa6ae036c
diff --git a/fern/openapi.json b/fern/openapi.json
index 08582db40..8a3537fa4 100644
--- a/fern/openapi.json
+++ b/fern/openapi.json
@@ -18958,12 +18958,59 @@
"model_settings": {
"anyOf": [
{
- "$ref": "#/components/schemas/ModelSettings"
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/OpenAIModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/AnthropicModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/GoogleAIModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/GoogleVertexModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/AzureModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/XAIModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/GroqModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/DeepseekModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/TogetherModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/BedrockModelSettings"
+ }
+ ],
+ "discriminator": {
+ "propertyName": "provider",
+ "mapping": {
+ "anthropic": "#/components/schemas/AnthropicModelSettings",
+ "azure": "#/components/schemas/AzureModelSettings",
+ "bedrock": "#/components/schemas/BedrockModelSettings",
+ "deepseek": "#/components/schemas/DeepseekModelSettings",
+ "google_ai": "#/components/schemas/GoogleAIModelSettings",
+ "google_vertex": "#/components/schemas/GoogleVertexModelSettings",
+ "groq": "#/components/schemas/GroqModelSettings",
+ "openai": "#/components/schemas/OpenAIModelSettings",
+ "together": "#/components/schemas/TogetherModelSettings",
+ "xai": "#/components/schemas/XAIModelSettings"
+ }
+ }
},
{
"type": "null"
}
],
+ "title": "Model Settings",
"description": "The model settings used by the agent."
},
"response_format": {
@@ -19354,6 +19401,79 @@
"required": ["end_index", "start_index", "title", "url"],
"title": "AnnotationURLCitation"
},
+ "AnthropicModelSettings": {
+ "properties": {
+ "max_output_tokens": {
+ "type": "integer",
+ "title": "Max Output Tokens",
+ "description": "The maximum number of tokens the model can generate.",
+ "default": 4096
+ },
+ "parallel_tool_calls": {
+ "type": "boolean",
+ "title": "Parallel Tool Calls",
+ "description": "Whether to enable parallel tool calling.",
+ "default": false
+ },
+ "provider": {
+ "type": "string",
+ "const": "anthropic",
+ "title": "Provider",
+ "description": "The provider of the model.",
+ "default": "anthropic"
+ },
+ "temperature": {
+ "type": "number",
+ "title": "Temperature",
+ "description": "The temperature of the model.",
+ "default": 1
+ },
+ "thinking": {
+ "$ref": "#/components/schemas/AnthropicThinking",
+ "description": "The thinking configuration for the model.",
+ "default": {
+ "type": "enabled",
+ "budget_tokens": 1024
+ }
+ },
+ "verbosity": {
+ "anyOf": [
+ {
+ "type": "string",
+ "enum": ["low", "medium", "high"]
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Verbosity",
+ "description": "Soft control for how verbose model output should be, used for GPT-5 models."
+ }
+ },
+ "type": "object",
+ "title": "AnthropicModelSettings"
+ },
+ "AnthropicThinking": {
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": ["enabled", "disabled"],
+ "title": "Type",
+ "description": "The type of thinking to use.",
+ "default": "enabled"
+ },
+ "budget_tokens": {
+ "type": "integer",
+ "maximum": 1024,
+ "minimum": 0,
+ "title": "Budget Tokens",
+ "description": "The maximum number of tokens the model can use for extended thinking.",
+ "default": 1024
+ }
+ },
+ "type": "object",
+ "title": "AnthropicThinking"
+ },
"ApprovalCreate": {
"properties": {
"type": {
@@ -20152,6 +20272,70 @@
"required": ["uuid"],
"title": "AuthResponse"
},
+ "AzureModelSettings": {
+ "properties": {
+ "max_output_tokens": {
+ "type": "integer",
+ "title": "Max Output Tokens",
+ "description": "The maximum number of tokens the model can generate.",
+ "default": 4096
+ },
+ "parallel_tool_calls": {
+ "type": "boolean",
+ "title": "Parallel Tool Calls",
+ "description": "Whether to enable parallel tool calling.",
+ "default": false
+ },
+ "provider": {
+ "type": "string",
+ "const": "azure",
+ "title": "Provider",
+ "description": "The provider of the model.",
+ "default": "azure"
+ },
+ "temperature": {
+ "type": "number",
+ "maximum": 1,
+ "minimum": 0,
+ "title": "Temperature",
+ "description": "The temperature of the model.",
+ "default": 0.7
+ },
+ "response_format": {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/TextResponseFormat"
+ },
+ {
+ "$ref": "#/components/schemas/JsonSchemaResponseFormat"
+ },
+ {
+ "$ref": "#/components/schemas/JsonObjectResponseFormat"
+ }
+ ],
+ "discriminator": {
+ "propertyName": "type",
+ "mapping": {
+ "json_object": "#/components/schemas/JsonObjectResponseFormat",
+ "json_schema": "#/components/schemas/JsonSchemaResponseFormat",
+ "text": "#/components/schemas/TextResponseFormat"
+ }
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Response Format",
+ "description": "The response format for the model."
+ }
+ },
+ "type": "object",
+ "title": "AzureModelSettings",
+ "description": "Azure OpenAI model configuration (OpenAI-compatible)."
+ },
"Base64Image": {
"properties": {
"type": {
@@ -20403,6 +20587,70 @@
"type": "object",
"title": "BatchJob"
},
+ "BedrockModelSettings": {
+ "properties": {
+ "max_output_tokens": {
+ "type": "integer",
+ "title": "Max Output Tokens",
+ "description": "The maximum number of tokens the model can generate.",
+ "default": 4096
+ },
+ "parallel_tool_calls": {
+ "type": "boolean",
+ "title": "Parallel Tool Calls",
+ "description": "Whether to enable parallel tool calling.",
+ "default": false
+ },
+ "provider": {
+ "type": "string",
+ "const": "bedrock",
+ "title": "Provider",
+ "description": "The provider of the model.",
+ "default": "bedrock"
+ },
+ "temperature": {
+ "type": "number",
+ "maximum": 1,
+ "minimum": 0,
+ "title": "Temperature",
+ "description": "The temperature of the model.",
+ "default": 0.7
+ },
+ "response_format": {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/TextResponseFormat"
+ },
+ {
+ "$ref": "#/components/schemas/JsonSchemaResponseFormat"
+ },
+ {
+ "$ref": "#/components/schemas/JsonObjectResponseFormat"
+ }
+ ],
+ "discriminator": {
+ "propertyName": "type",
+ "mapping": {
+ "json_object": "#/components/schemas/JsonObjectResponseFormat",
+ "json_schema": "#/components/schemas/JsonSchemaResponseFormat",
+ "text": "#/components/schemas/TextResponseFormat"
+ }
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Response Format",
+ "description": "The response format for the model."
+ }
+ },
+ "type": "object",
+ "title": "BedrockModelSettings",
+ "description": "AWS Bedrock model configuration."
+ },
"Block": {
"properties": {
"value": {
@@ -22978,12 +23226,59 @@
"model_settings": {
"anyOf": [
{
- "$ref": "#/components/schemas/ModelSettings"
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/OpenAIModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/AnthropicModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/GoogleAIModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/GoogleVertexModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/AzureModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/XAIModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/GroqModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/DeepseekModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/TogetherModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/BedrockModelSettings"
+ }
+ ],
+ "discriminator": {
+ "propertyName": "provider",
+ "mapping": {
+ "anthropic": "#/components/schemas/AnthropicModelSettings",
+ "azure": "#/components/schemas/AzureModelSettings",
+ "bedrock": "#/components/schemas/BedrockModelSettings",
+ "deepseek": "#/components/schemas/DeepseekModelSettings",
+ "google_ai": "#/components/schemas/GoogleAIModelSettings",
+ "google_vertex": "#/components/schemas/GoogleVertexModelSettings",
+ "groq": "#/components/schemas/GroqModelSettings",
+ "openai": "#/components/schemas/OpenAIModelSettings",
+ "together": "#/components/schemas/TogetherModelSettings",
+ "xai": "#/components/schemas/XAIModelSettings"
+ }
+ }
},
{
"type": "null"
}
],
+ "title": "Model Settings",
"description": "The model settings for the agent."
},
"context_window_limit": {
@@ -23741,6 +24036,70 @@
"required": ["input", "name"],
"title": "Custom"
},
+ "DeepseekModelSettings": {
+ "properties": {
+ "max_output_tokens": {
+ "type": "integer",
+ "title": "Max Output Tokens",
+ "description": "The maximum number of tokens the model can generate.",
+ "default": 4096
+ },
+ "parallel_tool_calls": {
+ "type": "boolean",
+ "title": "Parallel Tool Calls",
+ "description": "Whether to enable parallel tool calling.",
+ "default": false
+ },
+ "provider": {
+ "type": "string",
+ "const": "deepseek",
+ "title": "Provider",
+ "description": "The provider of the model.",
+ "default": "deepseek"
+ },
+ "temperature": {
+ "type": "number",
+ "maximum": 1,
+ "minimum": 0,
+ "title": "Temperature",
+ "description": "The temperature of the model.",
+ "default": 0.7
+ },
+ "response_format": {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/TextResponseFormat"
+ },
+ {
+ "$ref": "#/components/schemas/JsonSchemaResponseFormat"
+ },
+ {
+ "$ref": "#/components/schemas/JsonObjectResponseFormat"
+ }
+ ],
+ "discriminator": {
+ "propertyName": "type",
+ "mapping": {
+ "json_object": "#/components/schemas/JsonObjectResponseFormat",
+ "json_schema": "#/components/schemas/JsonSchemaResponseFormat",
+ "text": "#/components/schemas/TextResponseFormat"
+ }
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Response Format",
+ "description": "The response format for the model."
+ }
+ },
+ "type": "object",
+ "title": "DeepseekModelSettings",
+ "description": "Deepseek model configuration (OpenAI-compatible)."
+ },
"DeleteDeploymentResponse": {
"properties": {
"deleted_blocks": {
@@ -25324,6 +25683,26 @@
"required": ["function", "type"],
"title": "FunctionTool"
},
+ "GeminiThinkingConfig": {
+ "properties": {
+ "include_thoughts": {
+ "type": "boolean",
+ "title": "Include Thoughts",
+ "description": "Whether to include thoughts in the model's response.",
+ "default": true
+ },
+ "thinking_budget": {
+ "type": "integer",
+ "maximum": 1024,
+ "minimum": 0,
+ "title": "Thinking Budget",
+ "description": "The thinking budget for the model.",
+ "default": 1024
+ }
+ },
+ "type": "object",
+ "title": "GeminiThinkingConfig"
+ },
"GenerateToolInput": {
"properties": {
"tool_name": {
@@ -25395,6 +25774,212 @@
"required": ["tool", "sample_args", "response"],
"title": "GenerateToolOutput"
},
+ "GoogleAIModelSettings": {
+ "properties": {
+ "max_output_tokens": {
+ "type": "integer",
+ "title": "Max Output Tokens",
+ "description": "The maximum number of tokens the model can generate.",
+ "default": 65536
+ },
+ "parallel_tool_calls": {
+ "type": "boolean",
+ "title": "Parallel Tool Calls",
+ "description": "Whether to enable parallel tool calling.",
+ "default": false
+ },
+ "provider": {
+ "type": "string",
+ "const": "google_ai",
+ "title": "Provider",
+ "description": "The provider of the model.",
+ "default": "google_ai"
+ },
+ "temperature": {
+ "type": "number",
+ "maximum": 1,
+ "minimum": 0,
+ "title": "Temperature",
+ "description": "The temperature of the model.",
+ "default": 0.7
+ },
+ "thinking_config": {
+ "$ref": "#/components/schemas/GeminiThinkingConfig",
+ "description": "The thinking configuration for the model.",
+ "default": {
+ "include_thoughts": true,
+ "thinking_budget": 1024
+ }
+ },
+ "response_schema": {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/TextResponseFormat"
+ },
+ {
+ "$ref": "#/components/schemas/JsonSchemaResponseFormat"
+ },
+ {
+ "$ref": "#/components/schemas/JsonObjectResponseFormat"
+ }
+ ],
+ "discriminator": {
+ "propertyName": "type",
+ "mapping": {
+ "json_object": "#/components/schemas/JsonObjectResponseFormat",
+ "json_schema": "#/components/schemas/JsonSchemaResponseFormat",
+ "text": "#/components/schemas/TextResponseFormat"
+ }
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Response Schema",
+ "description": "The response schema for the model."
+ }
+ },
+ "type": "object",
+ "title": "GoogleAIModelSettings"
+ },
+ "GoogleVertexModelSettings": {
+ "properties": {
+ "max_output_tokens": {
+ "type": "integer",
+ "title": "Max Output Tokens",
+ "description": "The maximum number of tokens the model can generate.",
+ "default": 65536
+ },
+ "parallel_tool_calls": {
+ "type": "boolean",
+ "title": "Parallel Tool Calls",
+ "description": "Whether to enable parallel tool calling.",
+ "default": false
+ },
+ "provider": {
+ "type": "string",
+ "const": "google_vertex",
+ "title": "Provider",
+ "description": "The provider of the model.",
+ "default": "google_vertex"
+ },
+ "temperature": {
+ "type": "number",
+ "maximum": 1,
+ "minimum": 0,
+ "title": "Temperature",
+ "description": "The temperature of the model.",
+ "default": 0.7
+ },
+ "thinking_config": {
+ "$ref": "#/components/schemas/GeminiThinkingConfig",
+ "description": "The thinking configuration for the model.",
+ "default": {
+ "include_thoughts": true,
+ "thinking_budget": 1024
+ }
+ },
+ "response_schema": {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/TextResponseFormat"
+ },
+ {
+ "$ref": "#/components/schemas/JsonSchemaResponseFormat"
+ },
+ {
+ "$ref": "#/components/schemas/JsonObjectResponseFormat"
+ }
+ ],
+ "discriminator": {
+ "propertyName": "type",
+ "mapping": {
+ "json_object": "#/components/schemas/JsonObjectResponseFormat",
+ "json_schema": "#/components/schemas/JsonSchemaResponseFormat",
+ "text": "#/components/schemas/TextResponseFormat"
+ }
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Response Schema",
+ "description": "The response schema for the model."
+ }
+ },
+ "type": "object",
+ "title": "GoogleVertexModelSettings"
+ },
+ "GroqModelSettings": {
+ "properties": {
+ "max_output_tokens": {
+ "type": "integer",
+ "title": "Max Output Tokens",
+ "description": "The maximum number of tokens the model can generate.",
+ "default": 4096
+ },
+ "parallel_tool_calls": {
+ "type": "boolean",
+ "title": "Parallel Tool Calls",
+ "description": "Whether to enable parallel tool calling.",
+ "default": false
+ },
+ "provider": {
+ "type": "string",
+ "const": "groq",
+ "title": "Provider",
+ "description": "The provider of the model.",
+ "default": "groq"
+ },
+ "temperature": {
+ "type": "number",
+ "maximum": 1,
+ "minimum": 0,
+ "title": "Temperature",
+ "description": "The temperature of the model.",
+ "default": 0.7
+ },
+ "response_format": {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/TextResponseFormat"
+ },
+ {
+ "$ref": "#/components/schemas/JsonSchemaResponseFormat"
+ },
+ {
+ "$ref": "#/components/schemas/JsonObjectResponseFormat"
+ }
+ ],
+ "discriminator": {
+ "propertyName": "type",
+ "mapping": {
+ "json_object": "#/components/schemas/JsonObjectResponseFormat",
+ "json_schema": "#/components/schemas/JsonSchemaResponseFormat",
+ "text": "#/components/schemas/TextResponseFormat"
+ }
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Response Format",
+ "description": "The response format for the model."
+ }
+ },
+ "type": "object",
+ "title": "GroqModelSettings",
+ "description": "Groq model configuration (OpenAI-compatible)."
+ },
"Group": {
"properties": {
"id": {
@@ -26816,12 +27401,59 @@
"model_settings": {
"anyOf": [
{
- "$ref": "#/components/schemas/ModelSettings"
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/OpenAIModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/AnthropicModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/GoogleAIModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/GoogleVertexModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/AzureModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/XAIModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/GroqModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/DeepseekModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/TogetherModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/BedrockModelSettings"
+ }
+ ],
+ "discriminator": {
+ "propertyName": "provider",
+ "mapping": {
+ "anthropic": "#/components/schemas/AnthropicModelSettings",
+ "azure": "#/components/schemas/AzureModelSettings",
+ "bedrock": "#/components/schemas/BedrockModelSettings",
+ "deepseek": "#/components/schemas/DeepseekModelSettings",
+ "google_ai": "#/components/schemas/GoogleAIModelSettings",
+ "google_vertex": "#/components/schemas/GoogleVertexModelSettings",
+ "groq": "#/components/schemas/GroqModelSettings",
+ "openai": "#/components/schemas/OpenAIModelSettings",
+ "together": "#/components/schemas/TogetherModelSettings",
+ "xai": "#/components/schemas/XAIModelSettings"
+ }
+ }
},
{
"type": "null"
}
],
+ "title": "Model Settings",
"description": "The model settings for the agent."
},
"context_window_limit": {
@@ -30020,25 +30652,6 @@
],
"title": "Model"
},
- "ModelSettings": {
- "properties": {
- "max_output_tokens": {
- "type": "integer",
- "title": "Max Output Tokens",
- "description": "The maximum number of tokens the model can generate.",
- "default": 4096
- },
- "parallel_tool_calls": {
- "type": "boolean",
- "title": "Parallel Tool Calls",
- "description": "Whether to enable parallel tool calling.",
- "default": false
- }
- },
- "type": "object",
- "title": "ModelSettings",
- "description": "Schema for defining settings for a model"
- },
"ModifyApprovalRequest": {
"properties": {
"requires_approval": {
@@ -30136,6 +30749,89 @@
"title": "OmittedReasoningContent",
"description": "A placeholder for reasoning content we know is present, but isn't returned by the provider (e.g. OpenAI GPT-5 on ChatCompletions)"
},
+ "OpenAIModelSettings": {
+ "properties": {
+ "max_output_tokens": {
+ "type": "integer",
+ "title": "Max Output Tokens",
+ "description": "The maximum number of tokens the model can generate.",
+ "default": 4096
+ },
+ "parallel_tool_calls": {
+ "type": "boolean",
+ "title": "Parallel Tool Calls",
+ "description": "Whether to enable parallel tool calling.",
+ "default": false
+ },
+ "provider": {
+ "type": "string",
+ "const": "openai",
+ "title": "Provider",
+ "description": "The provider of the model.",
+ "default": "openai"
+ },
+ "temperature": {
+ "type": "number",
+ "maximum": 1,
+ "minimum": 0,
+ "title": "Temperature",
+ "description": "The temperature of the model.",
+ "default": 0.7
+ },
+ "reasoning": {
+ "$ref": "#/components/schemas/OpenAIReasoning",
+ "description": "The reasoning configuration for the model.",
+ "default": {
+ "reasoning_effort": "high"
+ }
+ },
+ "response_format": {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/TextResponseFormat"
+ },
+ {
+ "$ref": "#/components/schemas/JsonSchemaResponseFormat"
+ },
+ {
+ "$ref": "#/components/schemas/JsonObjectResponseFormat"
+ }
+ ],
+ "discriminator": {
+ "propertyName": "type",
+ "mapping": {
+ "json_object": "#/components/schemas/JsonObjectResponseFormat",
+ "json_schema": "#/components/schemas/JsonSchemaResponseFormat",
+ "text": "#/components/schemas/TextResponseFormat"
+ }
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Response Format",
+ "description": "The response format for the model."
+ }
+ },
+ "type": "object",
+ "title": "OpenAIModelSettings"
+ },
+ "OpenAIReasoning": {
+ "properties": {
+ "reasoning_effort": {
+ "type": "string",
+ "enum": ["minimal", "low", "medium", "high"],
+ "title": "Reasoning Effort",
+ "description": "The reasoning effort to use when generating text reasoning models",
+ "default": "minimal"
+ }
+ },
+ "type": "object",
+ "title": "OpenAIReasoning"
+ },
"Organization": {
"properties": {
"id": {
@@ -33694,6 +34390,70 @@
"title": "TextResponseFormat",
"description": "Response format for plain text responses."
},
+ "TogetherModelSettings": {
+ "properties": {
+ "max_output_tokens": {
+ "type": "integer",
+ "title": "Max Output Tokens",
+ "description": "The maximum number of tokens the model can generate.",
+ "default": 4096
+ },
+ "parallel_tool_calls": {
+ "type": "boolean",
+ "title": "Parallel Tool Calls",
+ "description": "Whether to enable parallel tool calling.",
+ "default": false
+ },
+ "provider": {
+ "type": "string",
+ "const": "together",
+ "title": "Provider",
+ "description": "The provider of the model.",
+ "default": "together"
+ },
+ "temperature": {
+ "type": "number",
+ "maximum": 1,
+ "minimum": 0,
+ "title": "Temperature",
+ "description": "The temperature of the model.",
+ "default": 0.7
+ },
+ "response_format": {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/TextResponseFormat"
+ },
+ {
+ "$ref": "#/components/schemas/JsonSchemaResponseFormat"
+ },
+ {
+ "$ref": "#/components/schemas/JsonObjectResponseFormat"
+ }
+ ],
+ "discriminator": {
+ "propertyName": "type",
+ "mapping": {
+ "json_object": "#/components/schemas/JsonObjectResponseFormat",
+ "json_schema": "#/components/schemas/JsonSchemaResponseFormat",
+ "text": "#/components/schemas/TextResponseFormat"
+ }
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Response Format",
+ "description": "The response format for the model."
+ }
+ },
+ "type": "object",
+ "title": "TogetherModelSettings",
+ "description": "Together AI model configuration (OpenAI-compatible)."
+ },
"Tool": {
"properties": {
"id": {
@@ -35316,12 +36076,59 @@
"model_settings": {
"anyOf": [
{
- "$ref": "#/components/schemas/ModelSettings"
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/OpenAIModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/AnthropicModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/GoogleAIModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/GoogleVertexModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/AzureModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/XAIModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/GroqModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/DeepseekModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/TogetherModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/BedrockModelSettings"
+ }
+ ],
+ "discriminator": {
+ "propertyName": "provider",
+ "mapping": {
+ "anthropic": "#/components/schemas/AnthropicModelSettings",
+ "azure": "#/components/schemas/AzureModelSettings",
+ "bedrock": "#/components/schemas/BedrockModelSettings",
+ "deepseek": "#/components/schemas/DeepseekModelSettings",
+ "google_ai": "#/components/schemas/GoogleAIModelSettings",
+ "google_vertex": "#/components/schemas/GoogleVertexModelSettings",
+ "groq": "#/components/schemas/GroqModelSettings",
+ "openai": "#/components/schemas/OpenAIModelSettings",
+ "together": "#/components/schemas/TogetherModelSettings",
+ "xai": "#/components/schemas/XAIModelSettings"
+ }
+ }
},
{
"type": "null"
}
],
+ "title": "Model Settings",
"description": "The model settings for the agent."
},
"context_window_limit": {
@@ -36037,6 +36844,70 @@
"type": "object",
"title": "VoiceSleeptimeManagerUpdate"
},
+ "XAIModelSettings": {
+ "properties": {
+ "max_output_tokens": {
+ "type": "integer",
+ "title": "Max Output Tokens",
+ "description": "The maximum number of tokens the model can generate.",
+ "default": 4096
+ },
+ "parallel_tool_calls": {
+ "type": "boolean",
+ "title": "Parallel Tool Calls",
+ "description": "Whether to enable parallel tool calling.",
+ "default": false
+ },
+ "provider": {
+ "type": "string",
+ "const": "xai",
+ "title": "Provider",
+ "description": "The provider of the model.",
+ "default": "xai"
+ },
+ "temperature": {
+ "type": "number",
+ "maximum": 1,
+ "minimum": 0,
+ "title": "Temperature",
+ "description": "The temperature of the model.",
+ "default": 0.7
+ },
+ "response_format": {
+ "anyOf": [
+ {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/TextResponseFormat"
+ },
+ {
+ "$ref": "#/components/schemas/JsonSchemaResponseFormat"
+ },
+ {
+ "$ref": "#/components/schemas/JsonObjectResponseFormat"
+ }
+ ],
+ "discriminator": {
+ "propertyName": "type",
+ "mapping": {
+ "json_object": "#/components/schemas/JsonObjectResponseFormat",
+ "json_schema": "#/components/schemas/JsonSchemaResponseFormat",
+ "text": "#/components/schemas/TextResponseFormat"
+ }
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Response Format",
+ "description": "The response format for the model."
+ }
+ },
+ "type": "object",
+ "title": "XAIModelSettings",
+ "description": "xAI model configuration (OpenAI-compatible)."
+ },
"letta__schemas__agent_file__AgentSchema": {
"properties": {
"name": {
@@ -36329,12 +37200,59 @@
"model_settings": {
"anyOf": [
{
- "$ref": "#/components/schemas/ModelSettings"
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/OpenAIModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/AnthropicModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/GoogleAIModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/GoogleVertexModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/AzureModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/XAIModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/GroqModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/DeepseekModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/TogetherModelSettings"
+ },
+ {
+ "$ref": "#/components/schemas/BedrockModelSettings"
+ }
+ ],
+ "discriminator": {
+ "propertyName": "provider",
+ "mapping": {
+ "anthropic": "#/components/schemas/AnthropicModelSettings",
+ "azure": "#/components/schemas/AzureModelSettings",
+ "bedrock": "#/components/schemas/BedrockModelSettings",
+ "deepseek": "#/components/schemas/DeepseekModelSettings",
+ "google_ai": "#/components/schemas/GoogleAIModelSettings",
+ "google_vertex": "#/components/schemas/GoogleVertexModelSettings",
+ "groq": "#/components/schemas/GroqModelSettings",
+ "openai": "#/components/schemas/OpenAIModelSettings",
+ "together": "#/components/schemas/TogetherModelSettings",
+ "xai": "#/components/schemas/XAIModelSettings"
+ }
+ }
},
{
"type": "null"
}
],
+ "title": "Model Settings",
"description": "The model settings for the agent."
},
"context_window_limit": {
diff --git a/letta/schemas/agent.py b/letta/schemas/agent.py
index 5274616dc..b3fa1cab1 100644
--- a/letta/schemas/agent.py
+++ b/letta/schemas/agent.py
@@ -18,7 +18,7 @@ from letta.schemas.letta_stop_reason import StopReasonType
from letta.schemas.llm_config import LLMConfig
from letta.schemas.memory import Memory
from letta.schemas.message import Message, MessageCreate
-from letta.schemas.model import ModelSettings
+from letta.schemas.model import ModelSettingsUnion
from letta.schemas.openai.chat_completion_response import UsageStatistics
from letta.schemas.response_format import ResponseFormatUnion
from letta.schemas.source import Source
@@ -85,7 +85,7 @@ class AgentState(OrmMetadataBase, validate_assignment=True):
)
model: Optional[str] = Field(None, description="The model handle used by the agent (format: provider/model-name).")
embedding: Optional[str] = Field(None, description="The embedding model handle used by the agent (format: provider/model-name).")
- model_settings: Optional[ModelSettings] = Field(None, description="The model settings used by the agent.")
+ model_settings: Optional[ModelSettingsUnion] = Field(None, description="The model settings used by the agent.")
response_format: Optional[ResponseFormatUnion] = Field(
None,
@@ -235,7 +235,7 @@ class CreateAgent(BaseModel, validate_assignment=True): #
description="The model handle for the agent to use (format: provider/model-name).",
)
embedding: Optional[str] = Field(None, description="The embedding model handle used by the agent (format: provider/model-name).")
- model_settings: Optional[ModelSettings] = Field(None, description="The model settings for the agent.")
+ model_settings: Optional[ModelSettingsUnion] = Field(None, description="The model settings for the agent.")
context_window_limit: Optional[int] = Field(None, description="The context window limit used by the agent.")
embedding_chunk_size: Optional[int] = Field(
@@ -421,7 +421,7 @@ class UpdateAgent(BaseModel):
description="The model handle used by the agent (format: provider/model-name).",
)
embedding: Optional[str] = Field(None, description="The embedding model handle used by the agent (format: provider/model-name).")
- model_settings: Optional[ModelSettings] = Field(None, description="The model settings for the agent.")
+ model_settings: Optional[ModelSettingsUnion] = Field(None, description="The model settings for the agent.")
context_window_limit: Optional[int] = Field(None, description="The context window limit used by the agent.")
reasoning: Optional[bool] = Field(
None,